Afaik, python does both (regular) garbage collection and reference counting. But that’s not why Python is much slower. Python is much slower because it’s interpreted rather than compiled. Like Java, bytecode is interpreted at runtime. Your jit won’t beat compiled haskell, c or rust in most cases. It’s good because it’s based on real profiling of your actual running code, which not every hand rolled premature optimisation is, but it’s limited. I don’t see the spineless tagless G machine (or whatever the geniuses in Glasgow have come up with these days for ghc’s runtime under the hood), as an interpreter, and haskell compiles the whole thing down to native machine code anyway. Machine code is just faster unless you’ve made some asymptotic error.
I don’t think rust is old, and I’m not trying to tear it down. I’m saying that you can have in place mutation, free on leaving scope, no garbage collection but yet no linear (affine) type system and hence no cumbersome terminology and notation. You can just write lovely functional code and it’s all compiled very well.
Roc is like Haskell without the monad transformer stack, just one do-everything monad for each application domain (so no one needs to know what a monad is), partial application but you get to specify which argument is to be filled (not just the final one), and you don’t need to know whether you wanted =#~ or &+~ to change something in your nested data structure. Add super fast compilation (seconds, not minutes, even the first time) and genuinely helpful error messages (you know what I mean if you’ve used elm much).
Afaik, python does both (regular) garbage collection and reference counting. But that’s not why Python is much slower. Python is much slower because it’s interpreted rather than compiled. Like Java, bytecode is interpreted at runtime. Your jit won’t beat compiled haskell, c or rust in most cases. It’s good because it’s based on real profiling of your actual running code, which not every hand rolled premature optimisation is, but it’s limited. I don’t see the spineless tagless G machine (or whatever the geniuses in Glasgow have come up with these days for ghc’s runtime under the hood), as an interpreter, and haskell compiles the whole thing down to native machine code anyway. Machine code is just faster unless you’ve made some asymptotic error.
I don’t think rust is old, and I’m not trying to tear it down. I’m saying that you can have in place mutation, free on leaving scope, no garbage collection but yet no linear (affine) type system and hence no cumbersome terminology and notation. You can just write lovely functional code and it’s all compiled very well.
Roc is like Haskell without the monad transformer stack, just one do-everything monad for each application domain (so no one needs to know what a monad is), partial application but you get to specify which argument is to be filled (not just the final one), and you don’t need to know whether you wanted =#~ or &+~ to change something in your nested data structure. Add super fast compilation (seconds, not minutes, even the first time) and genuinely helpful error messages (you know what I mean if you’ve used elm much).