[Haskell-cafe] Haskell-Cafe Digest, Vol 217, Issue 16

Richard Eisenberg lists at richarde.dev
Mon Sep 20 00:24:33 UTC 2021

> On Sep 17, 2021, at 1:11 PM, Tom Ellis <tom-lists-haskell-cafe-2017 at jaguarpaw.co.uk> wrote:
> On Fri, Sep 17, 2021 at 05:02:09PM +0000, Richard Eisenberg wrote:
>> For me, coming from a mostly Java background (but with a healthy
>> dollop of functional programming thrown in the mix -- but no
>> Haskell), the phrase that unlocked monads was "programmable
>> semicolon".
> I'm curious what "unlock" means here.

It's hard to be sure, as this was ~10 years ago, but I think it was about motivation for me. Specifically: why do we need more than one monad, IO. I understood that Haskell functions were pure, and thus could produce no side effects. So we needed to have *some* way of having a program interact with the world. This way was the set of functions that work in the IO monad. These operations need a way of interacting with pure code (i.e. `return`) and some way of sequencing (i.e. >>=). This was all clear enough. What I didn't understand is why there was a typeclass to capture this or why we needed other monads -- until I associated "monad" with "programmable semicolon". At that point, I realized that the idea is very powerful.


>  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?
> _______________________________________________
> Haskell-Cafe mailing list
> To (un)subscribe, modify options or view archives go to:
> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe <http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe>
> Only members subscribed via the mailman list are allowed to post.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20210920/4ec468b4/attachment.html>

More information about the Haskell-Cafe mailing list