6 ms·
I still don't quite get it though... Is being impractical actually a virtue for a strictly typed functional language nowadays? Like "if it hurts more, you'll le
by nnq 10y ago
I still don't quite get it though... Is being impractical actually a virtue for a strictly typed functional language nowadays? Like "if it hurts more, you'll learn more" or something?
Why would you drive a beginner towards Haskell and make some many "Haskell for beginners tutorials" instead of OCaml or F# (even Scala fi you're into JVM...) which gives you the same features but slightly more practical (usable records, ability to be impure and imperative when you want etc., some kind of oop-style feature for when they really fit the way you want to model a problem, less "string madness", no "forced verbose" syntax with repeating names of things to type them etc.). Plus friendly new cool tools/skins for them: https://facebook.github.io/reason/ https://facebook.github.io/reason/ , https://github.com/bloomberg/bucklescript https://github.com/bloomberg/bucklescript etc.
I agree it seems true, I did learn a lot while struggling to learn Haskell for a bit and hurting in the process, but... why?
- xwowsersx 10y agoBecause the goal of the course is to teach PURELY functional programming (watch the first video for a full definition of that) and Haskell is the most practical language in which to do pure FP AFAIK.
- nnq 10y agook, thanks. if this is your goal, then it seems like the right tool. monadic syntactic sugar helps too, so... ir fits.
- wyager 10y ago> which gives you the same features No they do not. Haskell's powerful typeclass system, advanced (kind) polymorphism, etc. are not available in those languages. Ocaml doesn't even support proper monads. Laughably, it doesn't even support HKTs! Not sure how Scala and F# fare in that regard. >usable records, A reasonable complaint about the core language, but essentially solved by lenses. >ability to be impure and imperative when you want Haskell has the ability to be pure and imperative when you want. You just can't lie about what you're doing. > some kind of oop-style feature Which features? >string madness I never understood this complaint. Three string types, plus lazy variants, is quite manageable. They are all very well-suited for a particular set of tasks, and I'm thankful the Haskell community doesn't shoehorn too much stuff into a single string type. Haskell cleanly solves the encoding problem, which many languages kind of sweep under the rug. > no "forced verbose" syntax with repeating names of things to type them No idea what in the world you are talking about. FWIW, Haskell is by far the least verbose language I have ever used. Every token has semantic significance. No waste.
- deleted 10y ago[deleted]
- hellofunk 10y ago+1 .. However OCaml does have a superb module system that is lacking in Haskell. Not sure about F#.
- wyager 10y agoTrue! That is definitely a major + for OCaml.
- deleted 10y ago[deleted]
- bogomipz 10y ago"advanced (kind) polymorphism .." I'm aware of the algebraic type system, can you elaborate on what you mean "by advanced (kind) polymorphism"?
- wyager 10y agoSure! Edit: This formatted poorly on HN. See here: https://gist.github.com/anonymous/3925f5e58d8647e6d82a3b2084367ab8 https://gist.github.com/anonymous/3925f5e58d8647e6d82a3b2084...