浏览代码

further reading for closures

Jeremy Siek 4 年之前
父节点
当前提交
06b4945304
共有 2 个文件被更改,包括 378 次插入3 次删除
  1. 354 1
      all.bib
  2. 24 2
      book.tex

文件差异内容过多而无法显示
+ 354 - 1
all.bib


+ 24 - 2
book.tex

@@ -463,8 +463,9 @@ organization of the course made it difficult for students to
 understand the rationale for the compiler design. Ghuloum proposed the
 understand the rationale for the compiler design. Ghuloum proposed the
 incremental approach~\citep{Ghuloum:2006bh}.
 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
 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
 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
 closures. A good next step for the interested reader is to look at the
 work of \citet{Keep:2012ab}.
 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}
 \chapter{Dynamic Typing}
 \label{ch:Rdyn}
 \label{ch:Rdyn}

部分文件因为文件数量过多而无法显示