Bryan Richter b at chreekat.net
Fri Sep 17 18:00:07 UTC 2021

```I myself heard "programmable semicolon" sometime after monads had clicked
for me, but I still appreciate it. To answer Tom's question, what these
short single sentences do is explain the *purpose* of monads, which is
really quite obscure at first.

Listing sequential actions one after the other is so intuitive you see it
everywhere. Take baking recipes as one example. Or assembly code. Or poems.

Procedural programming languages let you use the same intuition for
sequencing actions you've been using since you were carving hieroglyphics
into obelisks.

When a Haskeller says, "Monads are great! They let you chain effectful
actions together!" it can take a very long time to understand they actually
mean exactly what they're saying — the usual intuition is that sequencing
actions can't possibly be a real problem, so you go round and round in
circles trying to understand what "effectful" means, what "action" means,
and how these oh-so-important "laws" have anything to do with it.

A programmable semicolon cuts right to the truth: yes, really, functional
programming had to work hard to solve *that* problem.

I can understand why that viewpoint might be long-forgotten by those who
were involved in the effort to solve it. :) And I appreciate that it was
solved in such a general way that it can be applied to so many seemingly
unrelated things! That's the beauty of mathematics!

On Fri, 17 Sep 2021, 20.11 Tom Ellis, <

> On Fri, Sep 17, 2021 at 05:02:09PM +0000, Richard Eisenberg wrote:
> > > On Sep 17, 2021, at 3:50 AM, Tom Ellis <
> > >
> > > On Fri, Sep 17, 2021 at 01:43:01PM +0900, Michael Turner wrote:
> > >> I finally got (most of?) what monads really mean for practical
> > >> programming when none other than Simon Peyton-Jones said F# called a
> > >> very similar construct "workflow," a word he likes.
> > >
> > > Was it literally just a single sentence introducing a new word for a
> > > concept that made you "get it"?  Could you elaborate?  This is really
> > > quite remarkable.
> >
> > For me, coming from a mostly Java background (but with a healthy
> > dollop of functional programming thrown in the mix -- but no
> > semicolon".
>
> I'm curious what "unlock" means here.  Do you mean you could
> understand the definition of the monad class after coming across
> "programmable semicolon" but not before?  Or do you mean you
> understood the *purpose* of monads, but not necessarily how one would
> go about implementing them?  Or something else?
> _______________________________________________