from Wiktionary, Creative Commons Attribution/Share-Alike License
- n. An evaluation strategy in which the arguments to a function are evaluated the first time they are used in that function.
Sorry, no etymologies found.
Caching of this sort is what distinguishes call-by-need from call-by-name and allows lazy evaluation to work efficiently for data representations.
We would also like to combine this with call-by-need, so when an argument is duplicated it is only reduced once.
The result was later shown to be inapplicable to a lazy pure language (using call-by-need) by Bird, Jones and de Moor.
The main difference is that a macro generally has call-by-name / call-by-need semantics, and that it will modify it's current or surrounding AST nodes in some way.