4 ms·
Learn You A Haskell For Great Good -- the book -- coming soon
- jrockway 16y agoMiran Lipovača is a computer science student in Ljubljana, Slovenia. His online tutorial, "Learn You a Haskell for Great Good!," is widely regarded as the best way to learn Haskell. Seriously? LYAH is nice, but the examples are so contrived that I'd be surprised that anyone who learns Haskell from this book will be able to write any idiomatic Haskell code or even understand Haskell besides "hey, that's neat". I haven't read the whole book, though, just the stuff on the web. In my unbiased opinion, the best way to learn Haskell is to read RWH, read all the code that you use (just click the "source" link next to the function when you're reading the docs), and then say something like "monads are like burritos" on HN and wait for my comment :)
- naradaellis 16y agoLYAH might not be serious or idiomatic, but maybe that's why it works - well it worked for me anyway. Its lighthearted but that makes a great first contact with the language, for some audiences anyway. I personally did most of LYAH and then hit RWH (subsequently, I found the first few chapters of RWH were boring and slow in comparison to how the same topics were introduced in LYAH).
- jrockway 16y agoBut would you, after reading his description of applicative functors, notice that you should use it while you're in the middle of programming? I don't think so. I think all you get is the ability to write definitions for <$> and <∗> on the blackboard, which is better than nothing, but in the end, useless. RWH shows you when you apply all those things with weird names, rather than just showing you how to define them and come up with contrived examples. Anyway... good reading? Yes. Actively harmful? Nope. The absolute best way to learn Haskell with the intent to write programs in Haskell? Nope.
- giu 16y agoStarted to read through RWH (paperback, not the online version [1]), than read some chapters in LYAH, and now I'm reading Hutton's "Programming in Haskell." The latter, while a slick book (~ 170pages) is really a nice read, but if I have to recommend a book on Haskell, RWH is the one I'll mention for sure; you'll learn a lot about functional programming at large, the book includes a lot of code examples, and it's (mostly) written beginner-friendly. [1] http://book.realworldhaskell.org/read/ http://book.realworldhaskell.org/read/
- jrockway 16y agoMy favorite part of RWH is how it explains monads. Instead of introducing it as "here's a complex thing with some use cases that you won't understand", it just starts using monad-like structures, but doesn't call them monads. Then you get to the monad chapter, and it says, "oh hey, you know all that code you wrote in the other seven chapters? yeah. monads." Net result? I doubt that anyone who read RWH from the beginning and followed the examples has any trouble with monads. It's things like that that make RWH not just a good Haskell book, but a good programming book.
- giu 16y agoYep, definitely. Generally speaking, the book has a very good structure; everything has its place, and the book makes a very good job in guiding you from the very basics to the more complicated constructs. Moreover, all the constructs are explained very well thanks to the fact that they use quite a lot of code examples to back up explanations in the book, which help you understand everything much better. What I personally (as a novice) have to mention is, that RWH surely is a very good book, but nonetheless you'll start reading some paragraphs or chapters over and over again, especially if you come from the imperative programming branch. Haskell is definitely not easy for a beginner, so prepare yourself to put quite a lot of effort in learning the language and functional programming in general, it's definitely worth it! :)
- jfager 16y agoI really disliked that part, not because it wasn't informative, but because it contradicted the whole point of picking up a book with "Real World" in the title. You don't write pretend monads for pedagogical purposes in the real world, but you do parse binary formats. Why is the chapter that tells you you're learning the latter actually teaching you the former? Which isn't to say I hated the book itself. On the whole it's a great introduction, if you ignore the title and take what's actually there.