Basic Category Theory for Computer Scientist - Benjamin C. Pierce

First, a confession: I haven't really read this book. It's a maths book, and I've skipped the exercises and the most difficult bits. I'm now doing my second reading. However, I'm reviewing it anyway, as I would eventually like to clear my backlog of partially-read maths books which I've neither approximately finished, nor reviewed.

Why read about category theory? My day job is Haskell programming, and the others on my team are all into this stuff. I feel slightly silly not knowing it. :) Why this book? There are plenty available, and I chose this one because it's an introductory text intended for computer scientists. I don't want to start with the full generality being applied to abstract cases of no relevance to a computer scientist. Who knows... I may get there eventually, but that's not where I want to start. Even saying 'I want an introductory book for computer scientists', there are a few books on the market. I really rated Pierce's book on type systems, so I chose him again!

Is the book any good? Yes! It does what it says on the tin - it provides an explanation of the basic stuff, with a strong slant towards computer science and almost no mention of topology. The start of the book introduces the concepts, then there's a chapter giving a few simple examples in computer science (plus one complex one - that's going to be a painful one to read properly!), and finally there's a chapter on interesting books and papers in the field. It's a slim volume, at 100 pages all-in, but this feels the right length for a book like this. It's dense, and for a simple introduction any more would be overwhelming.

The style is pretty rigorous, as you'd expect in a mathsy volume. However, it's pretty friendly - there are plenty of examples to help understanding, exercises set at a doable level, etc. The subject is abstract enough that there don't seem to be many proofs, but those that are present are straightforward. The exercises and examples do hint towards the underlying intuition, but the intuition is rarely explicitly revealed, even if only to explain why it may not work in the general case.

And the subject? Category theory is a funny one. It's objects and arrows, generally representing, in some sense, types and transformations between the types, although noone would be so crass as to restrict it to such concrete uses. 'Commutivity diagrams' are generally about doing the same operation in different domains, and whether you get the same results if you transfer between the domains before or after performing the transform. And certain unique arrows appear to be about doing the operation which destroys or preserves the most information, while fitting into some role.

Category theory is a fairly controversial subject in some people's view - so-called 'abstract nonsense'. Having read this book, I can't tell if it's helpful for providing fundamental insights, or is simply a way of obfuscating the obvious.

Posted 2009-12-20.