There are a few threads that I’ve been attempting to unravel that don’t quite justify their own post. However, as each is proving to be very interesting, I’ve gathered them together:
Arrows - “Arrows are a new abstract view of computation … [that] serve much the same purpose as monads — providing a common structure for libraries — but are more general.”
A monad generalises a computation across its output. An arrow generalises computation for both input and output.
For fun, a Kleisli arrow will lift a monad abstraction to an arrow abstraction, but the interesting arrows are the ones that can’t be made into monads. Essentially, the arrow abstraction is a super-set of monadic abstractions.
As usual with Haskell, the interesting bits are in research papers.
Software Transactional Memory (STM) - “a quantum step forward from locks and conditionals” in concurrent programming.
Simon Peyton-Jones and Tim Harris were recently interviewed by Channel 9 on STM. The discussion covers the motivation of STM and outlines the types of problems it solves.
STM is available today in Haskell, as a GHC extension.
I’m only part way through the book, and it is stretching my brain in interesting ways. The benefit is that much of the terminology in research papers in functional programming is becoming more clear.
I haven’t had this much fun since writing a monadic based lambda calculus parser at uni.
Category theory - this is floating around the edges of a number of topics. There are veiled and direct references to how category theory is responsible for concepts such as monads and arrows.
Arrows in Haskell are directly inspired by category theory, which in turn is just the theory of arrows — a category is no more than a collection of arrows with certain properties.
For now, category theory is on my “to read” list, having piqued my interest.