A glance at some Haskell books

Today is a good day! I finally got my hands on two Haskell books: Programming in Haskell by Graham Hutton and Real World Haskell from O’Reilly. We’ll take a quick look at them, but first let me mention Learn You A Haskell for Great Good (commonly known as LYAH). If you’re wondering what is the best way to start learning Haskell then LYAH is probably it. It’s available online, but you can buy it as a book as well. It is written in a very accessible way – I’ve read most of it and so far there has been not a single thing that was unclear in any way. The only downside of LYAH is the lack of any kind of exercises. This forces you to be creative and come up with your own problems or perhaps try solving problems available on the web. Two common choices are the 99 Haskell Problems, which have a steep difficulty curve IMO, and Project Euler, which some people don’t recommend claiming that one should concentrate on the language itself, not on the difficult algorithms. Anyway, let’s look at the books.

Programming in Haskell covers rather basic material. It seems that some stuff that is in LYAH is not here. It’s hard for me to judge how many new material the book offers (comparing to LYAH), but I have an impression that it explains stuff from a formal point of view, whereas LYAH is more pragmatic and doesn’t go into theory of the language. There are exercises and I think that’s very important. I’ve also noticed some very nice example, namely the Game of Life. The book isn’t very long. It has only 170 pages. Despite its large format, there’s not to much text since the margins are about one third of the page width.

Real World Haskell is a different kind of book. In Poland such a thick book goes by the name of a brick. It’s almost 700 pages long and seems to cover lots of advanced material. I don’t think it’s a kind of book that’s suitable for newbies. It doesn’t seem to teach things in a quick and concise way, rather going into many details. This looks like the book that every person that wants to be a serious Haskell programmer has to read – I don’t think there is any competition to it a the moment. There’s a lot of practical stuff: interfacing with C, connecting to databases, using JSON, recognizing barcodes, testing, parsing, making a GUI, concurrent programming, profiling, software transactional memory and more. I like the fact there are many case studies. You can check it out yourself, since this book is also available online for free.

Now I have to find free time to read both of them.

Leave a Reply


Staypressed theme by Themocracy