Re:Show HN: Learn Functional Programming Using Haskell
by hellofunk on Tuesday August 02, 2016 @05:48PM
(#12213674)
+1 .. However OCaml does have a superb module system that is lacking in Haskell. Not sure about F#.
Re:Show HN: Learn Functional Programming Using Haskell
by wyager on Tuesday August 02, 2016 @06:02PM
(#12213766)
True! That is definitely a major + for OCaml.
Re:Show HN: Learn Functional Programming Using Haskell
by bogomipz on Tuesday August 02, 2016 @06:00PM
(#12213756)
"advanced (kind) polymorphism .."
I'm aware of the algebraic type system, can you elaborate on what you mean "by advanced (kind) polymorphism"?
Re:Show HN: Learn Functional Programming Using Haskell
by wyager on Tuesday August 02, 2016 @07:33PM
(#12214259)
Sure!
Edit: This formatted poorly on HN. See here: https://gist.github.com/anonymous/3925f5e58d8647e6d82a3b2084...
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.