|
@@ -463,8 +463,9 @@ organization of the course made it difficult for students to
|
|
|
understand the rationale for the compiler design. Ghuloum proposed the
|
|
|
incremental approach~\citep{Ghuloum:2006bh}.
|
|
|
|
|
|
-We thank Bor-Yuh Chang, John Clements, Jay McCarthy, Nate Nystrom, and
|
|
|
-Michael Wollowski for teaching courses based on early drafts.
|
|
|
+We thank Bor-Yuh Chang, John Clements, Jay McCarthy, Joseph Near, Nate
|
|
|
+Nystrom, and Michael Wollowski for teaching courses based on early
|
|
|
+drafts.
|
|
|
|
|
|
We thank Ronald Garcia for being Jeremy's partner when they took the
|
|
|
compiler course in the early 2000's and especially for finding the bug
|
|
@@ -9384,6 +9385,27 @@ These exercises only scratches the surface of optimizing of
|
|
|
closures. A good next step for the interested reader is to look at the
|
|
|
work of \citet{Keep:2012ab}.
|
|
|
|
|
|
+\section{Further Reading}
|
|
|
+
|
|
|
+The notion of lexically scoped anonymous functions predates modern
|
|
|
+computers by about a decade. They were invented by
|
|
|
+\citet{Church:1932aa}, who proposed the $\lambda$ calculus as a
|
|
|
+foundation for logic. Anonymous functions were included in the
|
|
|
+LISP~\citep{McCarthy:1960dz} programming language but were initially
|
|
|
+dynamically scoped. The Scheme dialect of LISP adopted lexical scoping
|
|
|
+and \citet{Guy-L.-Steele:1978yq} demonstrated how to efficiently
|
|
|
+compile Scheme programs. However, environments were represented as
|
|
|
+linked lists, so variable lookup was linear in the size of the
|
|
|
+environment. In this chapter we represent environments using flat
|
|
|
+closures, which were invented by
|
|
|
+\citet{Cardelli:1983aa,Cardelli:1984aa} for the purposes of compiling
|
|
|
+the ML language~\citep{Gordon:1978aa,Milner:1990fk}. With flat
|
|
|
+closures, variable lookup is constant time but the time to create a
|
|
|
+closure is proportional to the number of its free variables. Flat
|
|
|
+closures were reinvented by \citet{Dybvig:1987ab} in his Ph.D. thesis
|
|
|
+and used in Chez Scheme version 1~\citep{Dybvig:2006aa}.
|
|
|
+
|
|
|
+
|
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
|
\chapter{Dynamic Typing}
|
|
|
\label{ch:Rdyn}
|