3 ms·
Honest question that's going to draw some ire. Why use Haskell when we have rust? I've poked at Haskell and it was not a good experience. I just don't think yo
by eloff 6y ago
Honest question that's going to draw some ire. Why use Haskell when we have rust? I've poked at Haskell and it was not a good experience.
I just don't think you can make an honest business case for it on a greenfield project. That's my opinion, is there a chance I'm wrong?
- tome 6y agoIt would probably help if you said more about your experiences.
- gchamonlive 6y agoMaybe you could clarify what was not good in your experience poking at Haskell. Which source materials did you use? What is your background? How comfortable are you with higher level typing systems? I have very little hands-on experience, but with the little I messed with both languages, they serve different purposes and are not apples to apples comparison.
- gregwebs 6y agoHave you tried Haskell? It has garbage collection and immutability. This entirely removes the need for a borrow checker (while maintaining correctness). Overall development is at least twice as productive in my experience. Of course this comes with an associated slow-down in runtime performance.
- eloff 6y agoIf garbage collection is a plus and not a drawback on the project then I would prefer Go. In neither case would Haskell top the list of options for me.
- nimih 6y agoI'm not sure if an opinion of this sort can really be wrong, but here's an attempt at an honest case: - If you're working with complex domain objects, Haskell has somewhat better (edit: or at least more powerful) tools for forbidding invalid states during runtime and assisting refactors as your data model changes. - Haskell seems to have better libraries for writing parsers and compilers than Rust, if that's relevant to your project. - Some folks prefer ML syntax to Algol-like syntax. - The GC, immutable-by-default data, and reasonable concurrency model are pretty nice features of the GHC runtime. - The performance difference between Haskell and Rust probably doesn't matter for most projects. - Haskell might actually compile faster if you avoid crazy type-level programming shenanigans. - Haskell has a pretty decent REPL. Obviously, Rust has a different set of trade-offs, and the bigger cost to either is going to be that both are a bit off the beaten path and require some practice and experience to be productive and comfortable in.
- phillipcarter 6y agoRust is still fundamentally a systems programming language and Haskell is a higher-level application programming language. You can do both in either, just as you can write anything in any language that is turing complete. But that doesn't mean a given language is always meant for the kind of thing you're using it for.
- eloff 6y agoIs your argument then that rust is less fit for high level programming tasks? Because I disagree with that assessment.
- phillipcarter 6y agoYes.
- eloff 6y agoWhy? Rust is a nice modern language that's both imperative and functional with great tooling and libraries. What makes Haskell better in this area in your opinion?