Patrick O'Neill
unread,Jan 26, 2012, 9:00:23 PM1/26/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to balti...@googlegroups.com
In the last twenty years, monads have found broad application in many topics in programming languages. Despite its (alleged) utility, however, monadic programming is widely reputed to be difficult and abstruse. This perceived difficulty has encouraged a cottage industry in monad tutorials, variously comparing monads to burritos, spacesuits, boxes, amorous lovers, monsters, elephants and Bedouins. Disturbingly, it has become obligatory to begin monad tutorials by lamenting the proliferation of monad tutorials and announcing one's intention to solve the problem by writing the one true monad tutorial. (The result, of course, is N+1 monad tutorials.) The compulsion to write monad tutorials is so widespread (approximately 50 confirmed sightings as of 2012) that it is actually referred to as "the monad tutorial fallacy".
How did we get here? How could there be such widespread difference in intuitions about monads? I claim that it is precisely because monadic structures are so pervasive in computation that it is so difficult to offer canonical analogies, and so confusing see what essential similarities they share. For that reason, the aim of this talk is to introduce monads strictly from definitions and worked examples. By the end, you should understand what a monad is, why they're used, and how to derive your own.
This talk is pitched at the level of someone who thinks that attending a talk about functional programming sounds like a good idea I.e. it will probably be helpful to have some intuitive grasp of the lambda calculus. Code examples will be given in Haskell, but it is not necessary that you know the language. In fact, part of the fun will be to derive parts of Haskell syntax from scratch, so there's no need to know it in advance.