eager evaluation


eager evaluation

Any evaluation strategy where evaluation of some or allfunction arguments is started before their value is required.A typical example is call-by-value, where all arguments arepassed evaluated. The opposite of eager evaluation iscall-by-need where evaluation of an argument is only startedwhen it is required.

The term "speculative evaluation" is very close in meaningto eager evaluation but is applied mostly to parallelarchitectures whereas eager evaluation is used of bothsequential and parallel evaluators.

Eager evaluation does not specify exactly when argumentevaluation takes place - it might be done fully speculatively(all redexes in the program reduced in parallel) or may bedone by the caller just before the function is entered.

The term "eager evaluation" was invented by Carl Hewitt andHenry Baker and used in their paper ["TheIncremental Garbage Collection of Processes", Sigplan Notices,Aug 1977.ftp://ftp.netcom.com/pub/hb/hbaker/Futures.html]. It wasnamed after their "eager beaver" evaluator.

See also conservative evaluation, lenient evaluation,strict evaluation.