[Haskell-cafe] IO is a bad example for Monads
Bulat Ziganshin
bulat.ziganshin at gmail.com
Mon Dec 10 15:39:43 EST 2007
Hello Dan,
Monday, December 10, 2007, 9:44:06 PM, you wrote:
> When someone comes to me and says "I have this Python script that
just my cent or two for this discussion: sometime ago I've started an
"introduction to IO" tutorial. it's both not in English and not finished
so i'll just explain its idea: "Haskell has strict distinction between
procedures that may perform side-effects and pure functions;
functions can't call procedures. there is special notion for
procedures, with do/return/..." and further explanation shows various
details of building procedures. i think that such description closely
mirrors thinking of imperative-language programmers and allows to
overcome "monad barrier" in teaching "real-world haskell"
of course, this meant only as introductory course and at some moment
haskeller should read "all about monads" and "io inside", but i
consider this as intermediate-level or even advanced material
btw, explanation in terms of functions vs procedures isn't my own,
unfortunately i don't remember its origins, but i find it very helpful
and understandable for average imperative programmers
--
Best regards,
Bulat mailto:Bulat.Ziganshin at gmail.com
More information about the Haskell-Cafe
mailing list