Computing Reviews
Today's Issue Hot Topics Search Browse Recommended My Account Log In
Review Help
Search
Programming in Haskell
Hutton G., Cambridge University Press, New York, NY, 2007. 184 pp. Type: Book (9780521692694)
Date Reviewed: Aug 11 2008

When programmers hear about functional programming, they usually associate it with such stalwarts as Lisp and Scheme. Lisp has been with us for about half a century--computer science (CS) is not such a young field anymore--and many among us, at some point or another, maybe during college or when grappling with the Emacs editor, have come to learn it and love it, or detest it. Indeed, the success of Lisp sometimes blinds us to the fact that there is much more to functional programming than closing brackets; other functional programming languages have been developed and used for education, research, and practice.

Haskell is a functional programming language, particularly popular for teaching functional programming in the UK, but which has also found some application in research settings. It has much to recommend it, and approaching it for the first time can be a moment of revelation, especially if you have only been involved in procedural or object-oriented (OO) programming.

Hutton’s book is a slim volume describing the language. Its length--less than 160 pages, not counting the appendices--is a great asset. This is a dense book that will require close attention from the reader, but it is a rewarding book, in that the reader who persists will enjoy many “a-ha!” moments.

Nowadays, most programming books guide the reader closely in the learning process, by giving exact instructions on terminal input and screen output. Hutton does provide a brief introduction to the Haskell environment (called Hugs), but prefers rigor to gentle handholding; for instance, the example code is written to be read, not to be typed. So, the readers will see lambda expressions written with &lgr;, and unless they already know, they will have to turn to an appendix to see how this is typed (answer: \). It is clear that Hutton prefers to focus on principles. Because functional programming is pretty much about principles, I appreciate this route.

The book starts with the bare fundamentals, and then builds on top of them. The first interesting stand-alone program, an implementation of the Caesar cipher, comes a third of the way into the book. Up to that point, we have already encountered many elegant code snippets that illustrate the power of the Haskell functional programming paradigm.

Although brevity is a virtue of this book, there are points that would merit a more extended discussion. For example, the presentation of curried functions is about a page long, although currying is a key concept in Haskell. Such brevity does not convey the important fact that currying is used everywhere in Haskell; this will dawn on the reader later on, while reading subsequent chapters, or the reader may have to search online for better understanding.

Recursion and higher-order functions--that is, functions that take a function as an argument or return a function as a result--are given more space: a chapter each. Separate chapters treat parsers, interactive programs, types and classes, and lazy evaluation. The book closes with a brief introduction to reasoning about programs. As the book progresses, so does the size of the examples, allowing readers to see how the language can be used for more involved applications.

Even if you are already using Haskell in your everyday programming, it is still worth devoting some time to learn more about it; you will also learn more about other, more popular languages. After reading, for instance, about list comprehension in Haskell, list comprehension in Python seems like a natural offshoot. This is a book for programmers wanting a serious introduction to an important subject.

Reviewer:  Panagiotis Louridas Review #: CR135937 (0906-0516)
Bookmark and Share
  Reviewer Selected
Featured Reviewer
 
 
Haskell (D.3.2 ... )
 
 
Applicative (Functional) Languages (D.3.2 ... )
 
 
Applicative (Functional) Programming (D.1.1 )
 
 
Formal Definitions And Theory (D.3.1 )
 
 
Language Classifications (D.3.2 )
 
 
Language Constructs and Features (D.3.3 )
 
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: (2 of 2)
Sep 19 2008
Learn you a Haskell for great good!: a beginner’s guide
Lipovača M., No Starch Press, San Francisco, CA, 2011.  400, Type: Book (978-1-593272-83-8)
Mar 23 2012
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