Thursday, November 15, 2007


EagerLazy evaluation Lazy Partial Remote Short-circuit Strategy
For another use of this term, see Short-circuit evaluation.
In computer programming, lazy evaluation, also called delayed evaluation, is the technique of delaying a computation until such time as the result of the computation is known to be needed.
The benefits of lazy evaluation include: performance increases due to avoiding unnecessary calculations, avoiding error conditions in the evaluation of compound expressions, the ability to construct infinite data structures, and the ability to define control structures as regular functions rather than built-in primitives.
Languages that use lazy evaluation can be further subdivided into those that use a call-by-name evaluation strategy and those that use call-by-need. Most realistic lazy languages, such as Haskell, use call-by-need for performance reasons, but theoretical presentations of lazy evaluation often use call-by-name for simplicity.
The opposite of lazy evaluation is eager evaluation, also known as strict evaluation. Eager evaluation is the evaluation behavior used in most programming languages.

Other uses

Combinatory logic
Currying
Dataflow
Functional programming
Graph reduction
Lambda calculus
Lazy initialization
Lookahead
Minimal evaluation
Non-strict programming language
Normal order evaluation

No comments: