[Haskell] Probably a trivial thing for people knowing Haskell
Till Mossakowski
till at informatik.uni-bremen.de
Sun Oct 19 13:19:50 EDT 2008
Chry Cheng schrieb:
> "Brandon S. Allbery KF8NH" <allbery at ece.cmu.edu> writes:
>
>> Laziness is a double-edged sword.
>
> Perhaps the following page from Haskell Wiki would serve to enlighten
> more: http://haskell.org/haskellwiki/Foldr_Foldl_Foldl%27? This
> really made it clear to me how laziness can sometimes be a bad thing.
A student of mine switch from Haskell to Java because of exactly these
laziness problems - after he tried out to make the program stricter in
various ways, but failed to remove the space leak.
There should be an easy way of declaring a Haskell function (or, if
that won't work, a whole module) to use strict evaluation only, without
the need to manually insert seq and foldl' etc. everywhere (or even to
change the structure of the code completely).
Till Mossakowski
More information about the Haskell
mailing list