Newbie question on "statefullness"

Paul Hudak paul.hudak@yale.edu
Tue, 13 Aug 2002 09:05:25 -0400


Alistair Bayley wrote:
> OTOH, if you want to do anything useful with any language you have to
> learn to do IO (and simple IO is tackled early in most languages), and
> therefore you must deal with Monads. I often wish that Haskell books
> and tutorials would introduce IO earlier; it is often near the end, in
> the "advanced" topics (after you've been dazzled/saturated by the
> magic you can do with list functions and comprehensions, and how easy
> it is to create abstract datatypes, and write parsers, etc...).

I agree with this.  And for what it's worth, in my textbook "The Haskell
School of Expression" (http://haskell.org/soe), I introduce IO on page
37, Chapter 3 (out of 350 pages and 24 chapters).  This is even before I
talk about polymorphism and higher-order functions!  I talk about
"actions" and "sequencing", and I use the do syntax, but I do not
mention monads at all.  Monads are introduced on page 251, Chapter 18.

  -Paul Hudak