Computing Reviews
Today's Issue Hot Topics Search Browse Recommended My Account Log In
Review Help
Search
Learn you a Haskell for great good! : a beginner’s guide
Lipovača M., No Starch Press, San Francisco, CA, 2011. 400 pp. Type: Book (978-1-593272-83-8)
Date Reviewed: Mar 23 2012

Functional programming no longer needs justification. It is a great way to program despite Niklaus Wirth’s comments [1]--he groups functional programming among those ideas that, under critical scrutiny, have lost their initial splendor and brilliance.

Computer science (CS) students ideally learn functional programming early in the curriculum, and professional programmers benefit from being acquainted with it--it certainly impacts how they think about programming, and they may need to use it at some point in their careers. Since Haskell is becoming the lingua franca of functional programming, it is definitely worth learning.

The Haskell Web site (http://www.haskell.org/) recommends this book as the best place to start learning Haskell. The tutorial is also available online (http://learnyouahaskell.com/). It is aimed at readers with previous programming experience. The presentation concentrates on teaching Haskell as a thinking and programming process. Lipovača occasionally feels the need to contrast concepts from imperative and object-oriented languages with Haskell.

This is a great book for self-study. In the CS curriculum, it can serve as an additional resource for learning the language; however, I would not recommend using it as a textbook. Lipovača expects readers to use the Glasgow Haskell compiler (GHC) and GHC’s interactive environment (GHCi) to execute the code shown, but the book’s coverage of GHC and GHCi is minimal--just what is needed to load and compile programs.

The book is organized into 14 chapters. Input and output (I/O) are covered about halfway through, in chapters 8 and 9. Until then, the code samples are very short; the benefit to this is that the reader can clearly see the points being made. Experienced programmers will note that Haskell can accomplish a great deal in a few lines, yet the code is compact and easy to read. By the time I/O makes an appearance, Lipovača can show interesting nontrivial examples that take advantage of what was already covered. The wait is worthwhile. For good measure, in chapter 10, Lipovača explains, in exhaustive detail, the development of two problems: a reverse Polish string calculator, and an attempt to find an optimal path to travel from Heathrow Airport to London. The explanation is straightforward without attempting to be theoretically complete, and then it’s back to the nitty-gritty of Haskell and small code segments.

This book will provide readers with a solid grounding in Haskell. It covers not only the expected basics, but also some advanced topics. Some sections will require repeated readings--and lots of experimentation with the language. Keep in mind Simon Peyton Jones’ insightful comment: “Any language large enough to be useful is dauntingly complex” [2]. The thoughtful reader will wisely follow up with other sources in order to really master the language; the Haskell site has some suggestions along these lines.

Regrettably, I must mention several minor shortcomings. The index lacks some entries that should have been included, and a few entries do not correspond to the place where the material is presented. GHCi options are provided as single-letter options; using full names would be better for beginners. Finally, my initial reading of folding (pp. 73-79) left me somewhat baffled--some of the statements need additional explanation or justification. The fact that folding stores deferred computations recursively on a stack is not explicitly mentioned until page 94, when strict left folds are covered. To appreciate the nuances of folds, I recommend Haskell’s tutorial (http://www.haskell.org/haskellwiki/Fold) and the links mentioned there.

Reading this book is both demanding and fun. I recommend it.

Reviewer:  Edgar R. Chavez Review #: CR140007 (1208-0774)
1) Wirth, N. Good ideas, through the looking glass. Computer 39, 1(2006), 28–39.
2) Peyton Jones, S. Wearing the hair shirt: a retrospective on Haskell, invited talk at the 30th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL 2003), research.microsoft.com/en-us/um/people/simonpj/papers/haskell-retrospective/HaskellRetrospective.pdf (accessed March 22, 2012).
Bookmark and Share
  Reviewer Selected
Featured Reviewer
 
 
Haskell (D.3.2 ... )
 
Would you recommend this review?
yes
no
Other reviews under "Haskell": Date
Lava: hardware design in Haskell
Bjesse P., Claessen K., Sheeran M., Singh S. ACM SIGPLAN Notices 34(1): 174-184, 1999. Type: Article
Aug 27 2004
Programming in Haskell
Hutton G., Cambridge University Press, New York, NY, 2007.  184, Type: Book (9780521692694), Reviews: (1 of 2)
Aug 11 2008
Programming in Haskell
Hutton G., Cambridge University Press, New York, NY, 2007.  184, Type: Book (9780521692694), Reviews: (2 of 2)
Sep 19 2008
more...

E-Mail This Printer-Friendly
Send Your Comments
Contact Us
Reproduction in whole or in part without permission is prohibited.   Copyright 1999-2024 ThinkLoud®
Terms of Use
| Privacy Policy