3 May
2001
3 May
'01
1:19 a.m.
John Hughes wrote:
... Function bodies are clearly evaluated many times, once for each call, but non-function bindings should be evaluated at most once to respect call-by-need semantics.
Isn't this a very fragile distinction? It seems so susceptible to routine program transformations by both programmers and compilers (e.g., lambda lifting/unlifting, which can change a non-function finding into a function binding and vice versa). Also, I agree with Andreas Rossberg's observation:
... the Haskell Report ... does not even demand call-by-need evaluation (it only speaks of non-strict semantics).
Nikhil