Haskell: The Craft of Functional Programming (3rd Edition) (International Computer Science Series) (英語) ペーパーバック – 2011/9/22
Kindle 端末は必要ありません。無料 Kindle アプリのいずれかをダウンロードすると、スマートフォン、タブレットPCで Kindle 本をお読みいただけます。
Introducing functional programming in the Haskell language, this book is written for students and programmers with little or no experience. It emphasises the process of crafting programmes, problem solving and avoiding common programming pitfalls.
Covering basic functional programming, through abstraction to larger scale programming, students are lead step by step through the basics, before being introduced to more advanced topics.
This edition includes new material on testing and domain-specific languages and a variety of new examples and case studies, including simple games. Existing material has been expanded and re-ordered, so that some concepts such as simple data types and input/output are presented at an earlier stage.
Simon Thompson is a Senior Lecturer in Computer Science at the University of Kent. His research and teaching interests include functional programming and logical aspects of computer science.
1. very well explained with many pictures and examples.
2. based on Haskell 2010(third edition)
Learning Haskell is like learning C. Many of the language features are really easy, but some key features are challengeable.
When learning C, most of syntax/semantics except arrays and pointers can be learnt within few days, or even hours. But then, you would have hard time to master pointers, arrays and memory management, etc.
Haskell is not that different. Basic arithmetic, functions, types, pattern matching, guards and even recursions, you could learn in short time. But type classes, lambdas(especially, those reductions) are a bit harder and finally, monads can be very frustrating.
I am generally satisfied with the contents of the book, but his explain about lambdas and monads is a bit sparely. I think, he worried about to introduce mathematics(especially, lambda calculus and category theory). But, the functional languages are different than those imperative languages, in that its root is pure mathematics. They have a small set of simple yet powerful rules, which enables many neat tricks, and many of the tricks actually come from mathematical thinking. When you want to fully understand and to use the functional languages properly, basic theories are somewhat unavoidable. Actually, you don't need to know such as undecidability, model theory or constructive logic, etc. but the basics of (untyped-/typed-)lambda calculus(especially those of reductions, evaluation orders and some of their theorems), category theory(monad is a bit hard here, because it lies in the deep sea of category theory, but functors, for example, can be easily explained) is very helpful for thinking about higher order things and its practical use. Also, you don't need so much effort to learn only the basics of them. Without that they are explained sufficiently, the tutorial is teaching only the subset of Haskell.
Don't get me wrong, this book is the most nearly complete Haskell introductory text out there with the support of Haskell 2010. I wrote the insufficient parts, because it could be the 'complete' introduction to Haskell, when the author didn't avoid the whole theory parts. And since I have read his "Type Theory & Functional Programming", I have an impression that he can present the theories easily understandable. When this part is supplemented, it can be compared to the legendary (and most complete) "C programming : A modern approach" by K.N.King in Haskell world.
So, despite of the cons, I'll give 5 stars, because it is actually much better than other Haskell books.
"Learn You a Haskell For Great Good!", I feel is a better first book for the software professional.
But both books are excellent.
Finally, I wish one of the Haskell authors would give a pragmatic description of Category Theory.
Category Theory is a "tough nut" to crack.