[Haskell-cafe] Re: Can we come out of a monad?

Ivan Lazar Miljenovic ivan.miljenovic at gmail.com
Fri Jul 30 06:54:56 EDT 2010


Anton van Straaten <anton at appsolutions.com> writes:

> Ivan Miljenovic has already given a good response

Why thank you, kind sir!

/me bows

> I suspect that your idea of the meaning of purity came from
> over-generalization from the IO monad.  IO actions may be impure, but
> that's not true of all other monad types.  (Most are actually pure.)
>
> Really, the IO monad is a horrible exception to normal monadic
> behavior, and in an ideal world it should only be introduced as a
> special case after gaining a good understanding of monads in general.

Actually, the general consensus seems to be nowadays that people should
be taught IO without any mentions to monads at all (there are various
tutorials around, and if memory serves RWH does this as well), then
introduce the concept of monads and then say "oh, btw, that IO thing
we've been using all this time?  It's also one of these weird monad
things".

> It's a bit like teaching a new carpenter about the concept of "tools",
> and then starting them out with a chainsaw, leading to the natural
> conclusion that tools are loud, insanely dangerous things.

Heh, I like this analogy.

-- 
Ivan Lazar Miljenovic
Ivan.Miljenovic at gmail.com
IvanMiljenovic.wordpress.com


More information about the Haskell-Cafe mailing list