Real World Haskell - Bryan O'Sullivan, John Goerzen and Don Stewart

I've been meaning to read this book for some time now, and having got sufficiently nostalgic about Haskell, I finally did. "Real World Haskell" is apparently one of those oxymorons, like "ML for the Working Programmer", but I don't care. I still like Haskell.

This is not a short book. There's about 600 pages of proper content. It took a decent number of commutes for me to read (don't worry, I take public transport :p ).

I was intrigued as to how much theory they'd use, and how they would introduce the more algebraic structures. I feel the start of the book is pretty darn good, building up slowly, so that when you hit monads, around page 300, you've already seen the pattern a few time, and then you get the general version of it.

The code examples didn't convince me in a few cases - I was suspicious of some of the corner cases, and the barcode recognition code just seemed messy to me. Still, they helped move things along.

Once monads are introduced, a few extra topics like monad transformers and error handling are presented. I'd never really played with "ap" before, or studied MonadPlus, so I got to learn some new tricks, as well as seeing various style points written down that I'd only previously inferred. This was pretty much the high point of the book.

Then, from around page 450, the "real world" kicks in. Various programs introducing real-world interaction are given, and sadly this is pretty dull. Databases, web clients, GUIs, meh. Why do all books with network programming examples always have to re-explain TCP vs. UDP? There are some cool bits mixed in. "Concurrent and Multicore Programming" is pretty interesting, as is "Profiling and Optimisation". The book ends on a reasonably fun note with "Software Transactional Memory".

A few of my pet favourite subjects were missing - for example, no untied data types. Mutable arrays are hidden carefully in the Bloom Filter example chapter, without a sensible index entry. Indeed, many of the chapters feel ordered arbitrarily, sometimes using functions which are only described chapters later. There's no category theory, which I think is a good thing for a book like this.

Then there's the errata. I felt the start of the book was pretty good. By about halfway, I think everyone was tired out. I started spotting sufficiently many bugs that I started reading the book with the errata web page open. "Yep, thought that was a mistake."

A six-hundred-plus page book is a massive undertaking, especially if you're trying to produce nice code examples and cover a bunch of platforms, and write things to only use the features you've described so far. I'm still a bit disappointed. I must admit, there's a good book on Haskell in there somewhere, covered in a layer of errors and flab. Is it good? I don't begrudge the time I spent reading it, but I wish it had a little more confidence and didn't have to spend quite so much time and space justifying its "real world" nature.

Posted 2017-06-06.