0
$\begingroup$

Consider different ways of evaluating a procedure call and its arguments. Essentials of Programming Languages says

All the parameter-passing mechanisms (natural parameter passing, call by value, call by reference) we have discussed so far are eager: they always find a value for each operand. We now turn to a very different form of parameter passing, called lazy evaluation.

What I understand it is that:

  • In applicative order evaluation (eager evaluation), we distinguish between call by value, call by reference, call by sharing, etc.

  • In normal order evaluation (lazy evaluation), is there still similar distinction between call by value, call by reference, call by sharing, etc?

$\endgroup$
  • $\begingroup$ All three can be combined with lazy evaluation (compute as needed). Not that all necessarily make much sense... $\endgroup$ – vonbrand Aug 14 at 20:05
  • $\begingroup$ I think there is a similar distinction even when evaluation type is lazy. Lazy evaluation is type of evaluation in which the question is "when" the parameters will be evaluated, not "how" the parameters will be evaluated, so I think, distinction should still hold. $\endgroup$ – kiner_shah Aug 15 at 11:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.