A lot of Haskell, too little functional programming
October 15, 2013
I read “Learn You a Haskell for Great Good” to refresh my knowledge of Haskell. During my studies in the nineties, I was an enthusiastic functional programmer. I wrote my diploma thesis in 1997-98 on “Geometric Algorithms in Haskell.”
Since then, however, I have only rarely used Haskell because it is still relatively unknown in practice and clients are very reluctant to take risks. As a result, I had forgotten a lot of Haskell. Furthermore, Haskell has continued to evolve, and many new things have been added.
The programming language Haskell belongs to the functional programming languages, while the frequently used programming languages Java and C++ belong to the imperative programming languages. When learning Haskell, you therefore have to learn not just a new language, but a completely new “programming paradigm”—a completely new way of programming.
While the book presents the Haskell language in exhaustive detail, functional programming itself remains too much in the background. The classes Functor, Applicative, Monoid, and Monad are presented very extensively, while too few data structures are covered. Graphs and graph algorithms are completely missing and are only briefly touched upon in the shortest-path chapter. And it is precisely here that functional programming languages have their difficulties. On the other hand, the advantages of functional languages when reasoning about program properties, such as “equational reasoning,” program deduction, and proofs of correctness, are neglected.
The book is a good introduction to Haskell, but one should read at least one other book on the techniques of functional programming. The classic back then in the 90s was “Introduction to Functional Programming” by Bird and Wadler. In that book, the actual functional programming is explained in much more detail. However, many of today’s topics, such as monads, did not exist yet, which left more room for the actual core: functional programming.
- Miran Lipovaca
- Learn You a Haskell for Great Good!: A Beginner’s Guide
- No Starch
- 2011
See also the review on Amazon.