[Haskell-cafe] Re: Why purely in haskell?

jerzy.karczmarczuk at info.unicaen.fr jerzy.karczmarczuk at info.unicaen.fr
Thu Jan 10 13:34:31 EST 2008

Achim Schneider: 

> jerzy.karczmarczuk asks what's wrong with:
>> > [1..] == [1..] 
>> Whatever you may say more, this is neither obscure nor a bug. I still
>> wait for a relevant example. But I don't insist too much...  
> It's not an example of a bug, but of a cause.

A cause of WHAT?? This is a perfect, nice, runaway computation, which
agrees with all dogmas of my religion. 

Now, if somebody says that the fact that some people find it difficult to
grasp the essence of laziness, and THIS is a source of bugs, I may believe.
But not the laziness itself. (For some people the (==) operator seems to
be a permanent source of bugs.) 

The difference between fold and stricter fold' won't convince me either.
People who want to use laziness must simply read the documentation... 

On the other hand, what Don Stewart pointed out, the inconsistency between
enumFrom and enumFromTo, and the difference of behaviours when one passes
from Int to Integer, now, this is another story, worrying a little...

Perhaps another example is more relevant, the tradeoffs space-time in the
"optimized" version of the powerset generator... 

Jerzy Karczmarczuk 

More information about the Haskell-Cafe mailing list