[Haskell-cafe] IO is a bad example for Monads

Ketil Malde ketil+haskell at ii.uib.no
Sun Dec 9 17:35:42 EST 2007

Daniel Fischer <daniel.is.fischer at web.de> writes:

>>> IO is important because you can't write any real program without using
>>> it.

>> Ouch!  I get awfully discouraged when I read statements like this
>> one.

> I think Lennart was referring to that, you HAVE to know a little IO to write 
> programmes, at least getArgs, getLine, putStr(Ln), readFile, writeFile, 
> appendFile. And therefore some use of the IO monad has to be taught 
> relatively early.

Well, I guess you could get pretty far using 'interact' - far enough
in an educational setting to do lists and Maybe, and then monads,
before introducing monadic IO.

If I haven't seen further, it is by standing in the footprints of giants

More information about the Haskell-Cafe mailing list