An Experiential Introduction to Principles of Programming Languages by Rajan Hridesh;

An Experiential Introduction to Principles of Programming Languages by Rajan Hridesh;

Author:Rajan, Hridesh;
Language: eng
Format: epub
Tags: Programming languages; concepts of programming languages; essentials of programming languages; programming language textbook
Publisher: MIT Press


Instead of evaluating each expression to a value as before, in this call-by-name semantics, each argument expression is converted to a promise. Then, each promise is passed as a value to the function. A promise value is very similar to a FunVal, as shown here:

The main difference is that Promise doesn’t require any parameters to evaluate, but like FunVal, it also stores both the expression and the environment that contains bindings for free variables in that expression.

Another change that is needed concerns the semantics of VarExp. The evaluation of this expression needs to distinguish between variable values that are promises and those that are not:



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.