Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I have been learning Haskell from these two books over the last 4 months: "Practical Haskell by Alejandro Serrano" and "Practical Web Development with Haskell" by Ecky Putrady. With other languages I usually just skim through a book figuring out how the basic data structures, flow control and operations then start writing a toy CLI app or server but with haskell I felt completely lost when trying to follow examples in library documentation, even after several weeks of reading books. So I found it's really worth carefully going through the programming book and doing the exercises, at least beyond the monad transformers section, before diving into real code. I'm over the hump and am writing & understanding working code now, but still a long way from the level of mastery I have with imperative programming.


I think the problem with Haskell are not the concepts per se, but rather the terrible ergonomics (too many cryptic operators, point-free syntax, language extensions) and TERRIBLE learning material.

Monads, for instance, are hard to invent but are easier to use than most libraries. Most people won't come up with Monads and will only consume them. But books and Monad tutorials focus instead on explaining what they are and how they were invented. This is unnecessary.

Another problem is that the coolest things (monads, lenses, syntax extensions) are bolt-on, rather than built-in. So we compromise syntax (and sometimes consistency) in the name of extensibility. Such fundamental things should be in the StdLib. This is the same problem Javascript suffers from.

I strongly believe that a new language with the same semantics but a more approachable syntax and better learning materials (like Python) would be way more successful. Maybe that's OCaml but I'm not too experienced in it.


Syntax-wise Ocaml is waaaay weirder than Haskell. In fact, Haskell is a pretty typical representative of the whole ML language family, with StandardML being the cleanest of them all.


Actually, OCaml is much closer to the original ML that SML.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: