Home - Functional
Haskell: The Craft of Functional Programming (2nd Edition)
Price:
$40.33
$62.00
& 2-Day * Free Nationwide Shipping! (* details)
Availability: Usually ship in 24 hours if sold by Amazon.com
Product Details
| Binding: | Paperback |
|---|---|
| EAN: | 9780201342758 |
| Label: | Addison Wesley |
| Feature: | |
| Publisher: | Addison Wesley |
| Studio: | Addison Wesley |
Editorial Reviews
The second edition of Haskell: The Craft of Functional Programming is essential reading for beginners to functional programming and newcomers to the Haskell programming language. The emphasis is on the process of crafting programs and the text contains many examples and running case studies, as well as advice on program design, testing, problem solving and how to avoid common pitfalls.
Customer Reviews
It doesnt get to Monads until near the end, but perhaps that is a good thing. It depends on what you want out of a text.
I used this text for self study, and it is well suited to such a task.
My uni has this year chosen Haskell as the INTRODUCTORY language, apparently because it:
1) Is a clear implementation of some fundamental programming concepts
2) Puts everyone on an equal footing, since no-one is likely to have studied it (or even another functional language) before.
I have little formal background but have been messing around with scripting languages like TCL for a couple of years.
The initial transition to thinking from a functional perspective seemed very difficult. The idea of recursion as opposed "just sticking it in a loop" took a while to stick.
But I have found simply by working through the book I have progressed quickly and in only a few weeks it has become quite natural to think in a Haskell way.
I attribute this to the excellent layout of the book, but more importantly the frequent exercises provided throughout each chapter. As my lecturer is fond of saying, practice is the only way to learn programming, and it is by exploring the introduced concepts in this way that I feel my learning of Haskell has been most effective.
The book is paced, if anything, a little slowly. But since I am someone who likes to gain a thorough understanding of topics I don't mind this. The exercises themselves are well thought out and tend to offer an increasing amount of challenge. Something that conceptually seems trivial can be given an interesting twist when it comes to writing a function.
I suppose experienced programmers may have covered similar kinds of exercises in other languages so it may not be quite so interesting, and they will be more wrestling with the mechanics of Haskell than gaining theorertical insights. However this highlights it's usefulness to a beginning programmer.
It has been said that learning a functional language increases your abilities in other languages. Whether this is true for me I haven't discovered yet, but certainly it has given me far more insight than I could have got from a scripting langauge about what is actually happening in a program.
This really is a well-written and surprisingly accessible book considering the typical Haskell programmer. I can highly recommend it.
The good parts of this book are that it is extremely well organized. It includes many helpful exercises (which I highly recommend) and a very good introduction (the first ten or dozen chapters).
Later on in the book, however, I found increasing difficulty. The author picks up the pace of the material without, in my opinion, justification. By the end, he covers what, from reading several other books and many online articles, I consider the most confusing topic in a single chapter or two. Reading it several times, I'm still uncertain how to build an I/O intensive program in Haskell, and/or what a Monad truly is and/or how exception processing is properly handled.
That notwithstanding (because it seems to be a fairly common complaint of new Haskell students) I quite enjoyed the book. Before you buy it, though, you may wish to consider books from Paul Hudak (a Yale professor and nice guy) and Richard Bird, both of whom have written on Haskell; Paul actually taught a class which I avoided back in the early 90s - too bad, too, because then I wouldn't have to start from scratch so many years later.
If you are like me and you are learning Functional Programming after many years of other styles of programming Haskell can be daunting. Books like this explain things from the fundamental levels to more advanced levels. If you read the introduction to the book you will see that it is natural to skip around chapter to chapter when it becomes appropriate to do so. Deciding when it's appropriate is going to depend on your goals. If you want to write full-blown applications in Haskell you may find yourself skipping around much earlier than someone who wants to cover the language completely.
Overall I find this to be a very good book but some of the exercises can be very difficult for someone new to Functional Programming. Almost anything worth doing is not easy though :).
Aggravating these flaws is the typography, which is not just ugly, but dysfunctional: The font used for the unnumbered section headers is not sufficiently distinguished from the text font, so it is impossible to skip over the examples to new material being discussed.
The author has an annoying habit of using haskell-like pseudocode to explain ideas, without making it clear what is pseudocode and what is real, working code. In addition, the lines of code are interspersed with the text, making it unclear what would constitute a complete, compilable source code file. For example, the discussion of memoization leads off with the standard example of memoizing the naive recursive implementation of the Fibonacci function. First he gives an example of how to memoize it that he clearly marks as not real code that would compile. Then he gives another example that seems to be the one that he is saying would actually compile, but it doesn't compile either. There is no working version of the code on the book's web site, either. After this, he passes on to another example.
There's lots of SICP-like exercises to practice with if you want, though their placement makes the book a bit confusing at times if you don't as it's hard to tell the exercises and the material apart sometimes.
I haven't looked at competing Haskell books, but after reading this one, I don't see the need to. This book doesn't explain monads particularly well (though most other explanations, besides one explanation in a reddit comment I saw, are equally not understandable, so that's no great fault).
Overall, a great book for programmers who want to get into functional programming or quickly learn Haskell.
The approach the book takes is more or less instructing someone who knows absolutely nothing about programming in the ways of functional thinking. This makes it perfectly easy for an absolute beginner with no imperative or OOP prejudices to learn Haskell--just as if they were taught hex before decimal they'd catch onto hex real quick.
This is also a great text for someone who's had some functional programming experience (map, filter, reduce, monads) and for whom recursion is a friend. I've become a much better Python programmer (and a better programmer in general) from just scanning the book every time in the bathroom.
However, for a student who's been doing Java or C/C++ for a year or two, this will be extremely confusing. They will already have adopted a certain way of thinking and will have trouble going through this text. This is why this book was useless to me for several years.
But for the advanced guys or the absolute n00bs I'd definitely recommend this book. As far as functional programming books go it's downright lively. My only complaint is that it doesn't really show me any practical things I can do with Haskell (these examples seem hard to find anywhere), such as database or GUI stuff. I mean sure it's cool to do a graph walk incredibly succinctly, but that's not something I'm going to use for work . . .
Create your own review





