Real World Haskell
- ISBN: 978-0-596-51498
- Publisher: O'Reilly
- Publication Date: November 2008
- Pages: 670
- Price: £38.50
Functional languages have been around for a long time, but it's only relatively recently that interest in them has grown. One reason for this, perhaps, is that these days multi-core and parallel programming is becoming cheaper, and programmers want to take advantage of it. If you look in the right corners of the internet (programming.reddit.com, perhaps) you'll find quite a few articles about functional languages such as Erlang, F# and Haskell. Whatever the reason, one of these languages has just hit an important milestone: There is an O'Reilly book about it, so it must be real!
Perhaps I am not really in the target audience for Real World Haskell. It is aimed at people who already know how to program, perhaps using Python, Perl or Ruby, but who have not necessarily used a functional language before and have some interest in knowing what Haskell is all about. I, on the other hand, am a Haskell programmer who read the book in an effort to learn something about the real world is all about.
Haskell has for a long time been viewed as an "academic" language, merely useful for doing ivory tower research, and the textbooks have as a result tended to concentrate on more academic, dry, problems such as language implementation and theorem proving. These books certainly have their place, but Real World Haskell is different, and focuses on the kind of problems that a "real world" programmer (which I take to mean someone working in industry) would care about.
After a short introduction to the fundamental language features, including what they are and answering the deeper questions of why you should care about them (especially why you should care about functions and types), the book wastes little time in getting to a realistic example - processing JSON data. It continues in the same way, introducing difficult language concepts by relating them to realistic examples. The topics covered include many of the sorts of things you are likely to need to deal with in day to day programming - file processing, databases, parsing and regular expressions, graphical user interfaces, unit testing - as well as more advanced but equally practical topics such as concurrency and networking. If I had any complaints, it would be that the book does not cover web application programming. Given the extensive range of topics covered, however, this would be a little unfair. After reading this book, you would be more than well-equipped to learn to use any of the Haskell web frameworks, or even to write your own!
The book is well written and clear, and has benefited from extensive review from the community. It is hard for me to judge how easy it is to follow the Haskell concepts, since I've been using the language for years, but I certainly now feel I know more about what you can do with it beyond Computer Science research. Maybe I'll start adding user interfaces to my theorem provers :-) .
Haskell is worth learning, even if you never expect to use it, because once you "get it" it will change the way you think about programming (in a good way!). Thanks to Real World Haskell, and to O'Reilly for publishing it, the community finally has a book to recommend which shows not only the theory, but also puts it into practice writing the sorts of programs that real developers care about. If you want a deeper understanding of programming, I recommend learning Haskell. If you want to learn Haskell, I recommend you buy this book!
Score: 9 out of 10