[Haskell-cafe] When to teach IO

jerzy.karczmarczuk at info.unicaen.fr jerzy.karczmarczuk at info.unicaen.fr
Thu Dec 22 07:29:27 EST 2005

Bayley, Alistair asks (commenting my statement): 

> _What_ is easier in Scheme than in Haskell? IO, or teaching (IO)?

In my humble opinion, both. Mainly for psychological reasons,
we (well, "we", students more than "we", old Haskell cowboys...)
are used to the sequentiality of I/O. As people mentioned here,
even for a newbie there is no special hindrance to write a
do { ... putSomething ...}, especially if this "newbie" is a
<<faux-débutant>>, as the French say; if he/she has already some
acquaintance with other languages. 

But, mind you, the teacher may want to convey the static nature of
functional programs first. The teacher may wish to *avoid* the
sequentiality issues, he may insist on expression-centered programming,
and then the IO in Haskell becames *another language*, different
from typical interactively tested recursive functions, all the stuff
you know. 

That's it. In Scheme the integration of IO with the rest of the program
is more natural, you just have expressions with some side-effects, and
you accept that side-effects are natural. 

Jerzy Karczmarczuk 

More information about the Haskell-Cafe mailing list