Monads as a Programming Pattern
I think monads highlight something underappreciated about programming, which is that different people regard very different things as &quot;intuitive&quot;. It almost seems that modalities of thinking about programming are bigger, external things than programming itself. Certainly they&#x27;re barriers to learning.<p>Like Lisp, there seems to be about 10% of the programmer population who think &quot;ah this is obviously the clearest way to do it&quot; and the remaining 90% who go &quot;huh?&quot;, and the 10% are really bad at explaining it in a way the others can grasp.<p>The two monad explainers that really resonated with me were:<p>- How do you deal with state in a language that would prefer to be stateless? Answer: wrap <i>the entire external universe</i> and all its messy state up into an object, then pass that down a chain of functions which can return &quot;universe, but with some bytes written to the network&quot; (IO monad)<p>- If you have a set of objects with the same mutually pluggable connectors on both ends, you can daisy-chain them in any order like extension cables or toy train tracks.<p>(It&#x27;s a joke, but people need to recognise why &quot;A monad is just a monoid in the category of endofunctors&quot; is a bad explanation 99% of the time and understand how to produce better explanations)