[Haskell-cafe] curious about sum

Yitzchak Gale gale at sefer.org
Wed Jun 17 04:38:23 EDT 2009

Thomas Davie wrote:
> Not at all, as discussed, there are legitimate uses for a
> lazy sum, and haskell is a lazy language by default.

Haskell is lazy by default, and we have found that to be
a big win in most cases. So we don't need to be
embarrassed to use strictness when that is the
right thing to do.

While there are indeed certain very rare situations in which
you want foldr or foldl for sum, they are both joltingly wrong
as the default for typical usage.

In practice, I find this to be a small annoyance that occurs
so often that it becomes a major one. Can we please fix it

Let it be noted that this discussion also applies to product.


More information about the Haskell-Cafe mailing list