17 Jun
2009
17 Jun
'09
2:08 p.m.
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 already? Let it be noted that this discussion also applies to product. Thanks, Yitz