Implicit Lazy Evaluation

ImplicitLazyEvaluation occurs whenever a language provides a mechanism for lazy evaluation which requires no work on the code evaluating a lazy expression (it may require an explicit declaration of laziness/strictness at the point a function or a variable is defined, especially if laziness is not the default semantics). It is found in lazy functional languages like HaskellLanguage, as well as others which have lazy evaluation (or CallByName) as a declaration option (e.g., OzLanguage). In addition, many strict languages have lazy operators/special forms.

The primary difference between explicit and implicit lazy evaluation is that the code performing the evaluation has to know the difference in explicit evaluation. If you want to use Smalltalk blocks to perform lazy evaluation, you must send them the "value" message when you want to retrieve the value. In SchemeLanguage, similarly, you must use (force x) to evaluate x when x is a lazy form. Contrast with Haskell or OzLanguage, where merely mentioning a lazy form in a context which requires its value forces evaluation.

Examples:


See also ExplicitLazyEvaluation

CategoryLazyPattern


EditText of this page (last edited May 8, 2014) or FindPage with title or text search