Review: "Learn You a Haskell for Great Good!"
A couple of weeks ago, the good folks at No Starch Press were kind enough to send me a review copy of “Learn You a Haskell for Great Good!”, by Miran Lipovača.
People often perceive Haskell to be overly academic and hard to learn, and in many cases this reputation is deserved. Its history as a research language and fertile proving ground for new ideas in type systems and compiler technology have spawned hundreds (or even thousands) of very computer sciencey papers, containing what in my grad school days we used to euphemistically call “a very high ratio of Greek letters to text.”
In the past few years this perception has been slowly changing, as more practically-minded software engineering types have cottoned on to the indisputably useful features Haskell gives you for “real-world” programming: a super-fast native code compiler, expressive code with fewer bugs, great testing tools like QuickCheck, and many other little nuggets of pure awesome. Our community has suffered something of a bootstrapping problem, however: people hear a lot of noise about Haskell but resources for true beginners have been fairly scarce.
The release of Real World Haskell a couple of years ago went a long way towards making Haskell more accessible to the curious, but that book is most suitable for the intermediate-level practitioner, or for experienced programmers who already know other languages. What’s been missing is a gentle, clearly written guide covering the basics. I think “Learn You a Haskell” might be the book to change all that.
The thing that’s most impressive about “Learn You a Haskell” is how damned well-written it is. I’m assuming that English isn’t Miran’s mother tongue, and he deserves lots of kudos for creating such a clear and easy-to-read text in a foreign language. The other thing Miran does very well in this book is not overwhelming the beginner with a lot of technical verbiage or jargon: I was especially chuffed to see that the word “monad” doesn’t even appear in the book until page 267! After having suffered through innumerably many clumsy “monad tutorials” which go through the material all backwards, it’s completely satisfying to see it finally be done properly.
The book starts off on the right foot by starting with expressions, the fundamental building blocks of Haskell programs. Slowly, thoroughly, and with lots of examples, Miran proceeds from there to cover the rest of the concepts: functions, types, recursion, higher-order functions, lazy evaluation, type classes, algebraic data types, I/O — all are covered methodically and clearly, without any confusing discontinuities or weird conceptual leaps. By the time the book digs into more advanced topics like applicative functors and monads, I believe the beginning reader will have built up enough confidence to clear the conceptual hurdles.
To be clear, this is a beginner’s book: experienced Haskell programmers won’t find much to dig into here, and those expecting to find a lot of information about the practical aspects and best practices of “real world” day-to-day Haskell programming might be disappointed. As a beginner’s guide, however, this book is just fantastic, and those spending the time to read “Learn You a Haskell” and “Real World Haskell” in sequence will find a clear and easy path from the very beginning all the way through to the intermediate level of Haskell programming.
Comments
blog comments powered by Disqus