call-by-name
call-by-name
(reduction)This evaluation strategy is guaranteed to reach a normal form if one exists.
When used to implement functional programming languages,call-by-name is usually combined with graph reduction toavoid repeated evaluation of the same expression. This isthen known as call-by-need.
The opposite of call-by-name is call-by-value wherearguments are evaluated before they are passed to a function.This is more efficient but is less likely to terminate in thepresence of infinite data structures and recursivefunctions.
Arguments to macros are usually passed using call-by-name.