Call-by-...

Kineese
BASIC-Programmierer
BASIC-Programmierer
Beiträge: 111
Registriert: 14. Feb 2008 18:33

Call-by-...

Beitrag von Kineese »

Hi there again!
More questions I'm asking, I'm thinking more that my knowledge about COPL is bad as hell :P

This time it is about the types of call-by-<Value|Name|Need>.
I guess the topic of call-by-... comes up with the evaluation of expressions.

As Wiki says Call-by-Name has the effect that functions arguments will only be evaluated when the holding function is called (after substitution). As a side-effect: each time the function is called the expression will be evaluated each time.

Call-by-Value will always evaluate the functions argument even if the functions never called.

Call-by-Need aka. Lazy Evaluation (says Wiki)
The same like call-by-name, only that the result of the arguments evaluation are stored in an environment, so further computation of the same expression is no more needed.

Did I miss another type of call-by-... ?

EDIT:
As I see, there was already a similar question here

Zurück zu „Archiv“