2006/12/19, Brandon S. Allbery KF8NH <[EMAIL PROTECTED]>:
On Dec 19, 2006, at 16:03 , minh thu wrote: > 2006/12/19, Neil Mitchell <[EMAIL PROTECTED]>: >> not_term = non_term >> f x = 12 >> >> Now evaluating: >> >> main = f non_term >> >> In a lazy language the value is always 12, in a strict language its >> always _|_. Now let's inline f: >> >> main = 12 >> >> In a lazy language the value is still 12, in a strict language the >> value has changed. > Sorry, I don't see how it has changed. > Isn't it still _|_ ? i.e. No, because inlining f results in the inlined value being 12, where it used to be _|_. Depending on the optimizer, it may well drop the call to non_term entirely because it's not being used (thus changing program semantics), or it may continue to call it (final result will remain _|_ because the inlined value is never reached).
Thank you, I see now. mt _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe