
12 Feb
2007
12 Feb
'07
5:22 a.m.
Lennart Augustsson wrote:
I'm not sure what you're asking. The (untyped) lambda calculus is Turing complete. How could seq improve that?
Obviously, it can't. But how can it hurt? Classical lambda calculus does not model the semantics of laziness, so seq is equivalent to flip const there, just like foldl' is equivalent to foldl. If we modify the lambda calculus to model laziness - let's say, by restricting beta-reduction - then the interesting properties of seq are revealed. Why should we treat seq differently in Haskell just because its interesting properties are not modeled in the classical lambda calculus? Haskell is not a classical language, it is non-strict (among other differences). Regards, Yitz