15 Jun
2009
15 Jun
'09
12:40 a.m.
On 14 Jun 2009, at 12:47, Roman Cheplyaka wrote:
* Deniz Dogan
[2009-06-13 16:17:57+0200] I remember needing a non-strict sum at least once, but I do not remember the exact application.
We may agree that lazy sum is sometimes (rarely) needed, but then it can be always written as fold. However, in most cases user wants strict sum.
So it's not really an excuse.
How's this for an "excuse" - Haskell is a lazy language. It also happens to have support for strictifying things when necessary. The Haskell API is designed to be lazy, like the rest of the language, similarly though, where commonly used, strict versions are provided, like for example foldl'. A much better idea than making sum strict, would simply be to add a sum'. Bob