Sunday, March 05, 2006
Functional Design Patterns
As you might be aware, over the past few months I've been scratching my formalist itch again and looking at functional programming languages and lambda functions. I've been trying to understand monads, but as yet I don't have a good feel for them - I haven't done a comprehensive search, but I've not found many accessible papers on how to design or use monads. One of the better papers is The Design of a Pretty-printing Library by John Hughes. Roughly, monads correspond to higher order lambdas. So whilst it is well known that many design patterns are simple applications of functional programming (e.g. visitor == map), I can't help but ponder how many of Grady Booch's 900 design patterns are simple applications of higher order functions in functional programming. There doesn't appear to be a lot of work done in this area... any pointers/references would be great to know.
Update (16/3): I've just reread (parts of) Monads for Functional Programming, and the ideas in it are beginning to gel.