4 ms·
Haskell has more concepts than Rust (like higher kinder types) and should get linear types soon. Rust seems like Go with some Java and the great borrow checking
by haskellandchill 9y ago
Haskell has more concepts than Rust (like higher kinder types) and should get linear types soon. Rust seems like Go with some Java and the great borrow checking system.
- pcwalton 9y agoAssociated types put Rust beyond Java and far beyond Go in terms of type system features, even without counting anything lifetime-related.
- haskellandchill 9y agoInteresting, didn't know it had something like type families. Thanks!
- moomin 9y agoWith the best will in the world, linear types are still going to take some serious work. Look at the guy doing a linear type streaming library. And that's just at the language level. You then need pervasive library support. And then you need more GHC work on optimisation, work out how you interoperate with levity polymorphism and so on and so on. And _after_ all this work is done, I seriously doubt you'll be able to control memory usage as well as Rust does now. I love Haskell to bits, but there's no way it's going to beat Rust at what Rust's good at for a long time to come.
- pjmlp 9y ago> And _after_ all this work is done, I seriously doubt you'll be able to control memory usage as well as Rust does now. Which might be totally irrelevant in most use cases, if it is within the desired application bounds. I have replaced more C++ systems with Java and .NET solutions than the other way around.
- moomin 9y agoWell yes, but that's true right now as well. There's definitely things that Haskell's better than Rust at, but OP was arguing that it was going to be better in _all_ cases. Instead, the choice in five years time is going to be pretty similar to what it is now.
- wtetzner 9y ago> but OP was arguing that it was going to be better in _all_ cases. I wasn't clear to me if haskellandchill was claiming that Haskell will be better, or if Haskell is more complicated. I assumed they meant it's more complicated than Rust, but now I'm not sure.
- moomin 9y agoIronically, I think linear types are really cool. But I also think it's going to be years before benefits are seen in average programs.
- haskellandchill 9y agoI meant more complicated.
- lmm 9y agoHigher kinded types don't seem like much of an extra concept. If anything they're a simplification: type parameters can be any type, rather than only being unparameterized types.