[Haskell-beginners] A first try

Yitzchak Gale gale at sefer.org
Mon Jun 27 19:55:14 CEST 2011


David Place wrote:
> It's hGetContents that bothers me.  I have found that friends who I have
> convinced to learn Haskell always trip over this right away. They want
> to write a simple program that processes a file and immediately get
> tangled up with lazy IO and looking up the definition of deepseq.
> It's kind of embarrassing.

There's nothing to be embarrassed about. Haskell is lazy by default.
That is certainly much different than what most people are
used to. So it needs to be explained to beginners. It's the same
for IO laziness as for pure laziness.

I'd much rather explain that, which fits in with the whole
style of Haskell, than to have to explain Iteratees to a newcomer.

In any case, you can't expect the switch from Python to Haskell
to go nearly as smoothly as the switch from Perl to Python.
The paradigm shift is much bigger.

-Yitz



More information about the Beginners mailing list