Anonymous user
Lazy evaluation: Difference between revisions
Moved to enc, corrected English, reorganized some facts
(gotta link to Haskell) |
(Moved to enc, corrected English, reorganized some facts) |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 1:
<!--[[Category:
Usually the programming language
Lazy evaluation is best represented by short-circuit logical operations, known to many programming languages.
Line 7:
There exist two major contexts where laziness of evaluation is considered:
* When the expression value does not depend on the evaluation time, which is usually the case for [[functional
* When the expression value depends on the evaluation time, laziness changes the program semantics. This type of laziness is used in low-level [[concurrent programming]], when the state of an object might change asynchronously to the program. Such objects are usually marked as ''volatile'', and their values are acquired as late as possible. Further, the compiler is instructed not to store them when evaluating temporal expressions.
|