Skip to Content
Programming Languages: Concepts and Implementation
book

Programming Languages: Concepts and Implementation

by Saverio Perugini
December 2021
Beginner
840 pages
47h 29m
English
Jones & Bartlett Learning
Content preview from Programming Languages: Concepts and Implementation

6.11 Deep, Shallow, and Ad Hoc Binding

The presence of first-class procedures makes the determination of the declaration to which a nonlocal reference binds more complex than in languages without support for first-class procedures. The question is: Which environment should be used to supply the value of a nonlocal reference in the body of a passed or returned function? There are three options:

  • deep binding uses the environment at the time the passed function was created

  • shallow binding uses the environment of the expression that invokes the passed function

  • ad hoc binding uses the environment of the invocation expression in which the procedure is passed as an argument

Consider the following Scheme expression:

Description

The function ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Concepts and Semantics of Programming Languages 1

Concepts and Semantics of Programming Languages 1

Therese Hardin, Mathieu Jaume, Francois Pessaux, Veronique Viguie Donzeau-Gouge
Programming C# 10

Programming C# 10

Ian Griffiths

Publisher Resources

ISBN: 9781284222739