[Haskell-cafe] Re: Tutorial uploaded
Creighton Hogg
wchogg at login01.hep.wisc.edu
Wed Dec 21 06:00:12 EST 2005
On Wed, 21 Dec 2005, Robin Green wrote:
> Henning Thielemann wrote:
> > Starting with IO in Haskell is like starting LaTeX with rotating text and
> > making it colorful.
>
> Not at all!
>
> > Indeed IO _is_ complicated regardless of whether it is
> > modelled by Monads in Haskell or differently in other languages.
>
> Rubbish!
>
> 10 PRINT "WHAT IS YOUR NAME?"
> 20 INPUT NAME
>
> IO isn't complicated in BASIC.
I agree.
Not that it's *really* complicated in haskell, though.
I think all a tutorial needs to do is explain
"= means a definition, <- means the left side is the result
of the right side"
In order to show that
x = getLine means that x is the function getLine while
x <- getLine means that x is the result of getLine
Monads can come *way* later I think, but even then they're
not difficult at all.
> > Beginners should start with non-monadic functions in order to later avoid
> > IO in their functions whereever possible.
>
> Whilst localising IO to a small part of the program is generally a good
> idea, beginners should not be scared off by the thought that IO in
> Haskell is so hard it has to be covered on page 94. This is not the
> case. It should be introduced on page 1.
>
> If people want Haskell to be treated as a practical language, not just
> something for doing academic teaching and research with, it should be
> taught as a practical language - which means that things like IO and
> space/time usage come to the forefront.
I agree with this wholeheartedly. When I first started
playing with Haskell, some of the tutorials made it look
like it was very difficult to do anything practical with it
because doing real input and output seemed like an "advanced
topic".
More information about the Haskell-Cafe
mailing list