Hi,

Is lazy evaluation necessary for a functional language to remain
functional?

The reason I ask is that because it violates beta-reduction, and also
referential transparency (I think). In haskell, we can transform:

g x + f x

into:

f x + g x

as both f and g do not change the parameter x.

If g always evaluates to a normal form (in both a lazy and a strict world)

g x = x

but f is defined thus:

f x = (\y -> if x /= 0 then x else y/x)

And we apply f to 0 (1/0) then f becomes _|_

therefore:

0 + _|_ /= _|_ + 0

Or, does this just become:

_|_ = _|_ ?

Or, am I missing something totally obvious?

Regards,
Chris.


_______________________________________________
Haskell mailing list
Haskell@haskell.org
http://www.haskell.org/mailman/listinfo/haskell

Reply via email to