News for hackers. Stuff that matters.
Re:Show HN: Learn Functional Programming Using Haskell by nnq on Tuesday August 02, 2016 @12:35PM (#12211138)
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://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?

Re:Show HN: Learn Functional Programming Using Haskell by wyager on Tuesday August 02, 2016 @02:06PM (#12211834)
> 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.

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...

Re:Show HN: Learn Functional Programming Using Haskell by xwowsersx on Tuesday August 02, 2016 @12:44PM (#12211211)
Because 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.
Re:Show HN: Learn Functional Programming Using Haskell by nnq on Tuesday August 02, 2016 @01:48PM (#12211691)
ok, thanks. if this is your goal, then it seems like the right tool. monadic syntactic sugar helps too, so... ir fits.