Jeremy Siek 3 jaren geleden
bovenliggende
commit
2ee362dc97
2 gewijzigde bestanden met toevoegingen van 26 en 21 verwijderingen
  1. 19 14
      book.tex
  2. 7 7
      defs.tex

+ 19 - 14
book.tex

@@ -22,7 +22,7 @@
 
 \def\racketEd{0}
 \def\pythonEd{1}
-\def\edition{0}
+\def\edition{1}
 
 % material that is specific to the Racket edition of the book
 \newcommand{\racket}[1]{{\if\edition\racketEd{#1}\fi}}
@@ -9309,11 +9309,14 @@ The \code{set!} consists of a variable and a right-hand-side
 expression.  The \code{set!} updates value of the variable to the
 value of the right-hand-side.
 %
-The primary purpose of both the \code{while} loop and \code{set!}  is
-to cause side effects, so it is convenient to also include in a
-language feature for sequencing side effects: the \code{begin}
-expression. It consists of one or more subexpressions that are
-evaluated left-to-right.
+The primary purpose of both the \code{while} loop and \code{set!} is
+to cause side effects, so they do not have a meaningful result
+value. Instead their result is the \code{void} value.  The expression
+\code{(void)} is an explicit way to create the \code{void} value. With
+the addition of side-effecting features such as \code{while} loop and
+\code{set!}, it is convenient to also include in a language feature
+for sequencing side effects: the \code{begin} expression. It consists
+of one or more subexpressions that are evaluated left-to-right.
 %
 \fi
 
@@ -10244,14 +10247,16 @@ for the compilation of \LangLoop{}.
 %% \margincomment{\scriptsize Be more explicit about how to deal with
 %%   the root stack. \\ --Jeremy}
 
-In this chapter we study the implementation of mutable tuples, called
-vectors in Racket. This language feature is the first to use the
-computer's \emph{heap}\index{subject}{heap} because the lifetime of a
-Racket tuple is indefinite, that is, a tuple lives forever from the
-programmer's viewpoint. Of course, from an implementer's viewpoint, it
-is important to reclaim the space associated with a tuple when it is
-no longer needed, which is why we also study \emph{garbage
-collection} \index{garbage collection} techniques in this chapter.
+In this chapter we study the implementation of tuples
+\racket{, called vectors in Racket}.
+%
+This language feature is the first to use the computer's
+\emph{heap}\index{subject}{heap} because the lifetime of a tuple is
+indefinite, that is, a tuple lives forever from the programmer's
+viewpoint. Of course, from an implementer's viewpoint, it is important
+to reclaim the space associated with a tuple when it is no longer
+needed, which is why we also study \emph{garbage collection}
+\index{garbage collection} techniques in this chapter.
 
 Section~\ref{sec:r3} introduces the \LangVec{} language including its
 interpreter and type checker. The \LangVec{} language extends the \LangIf{}

+ 7 - 7
defs.tex

@@ -22,13 +22,13 @@
 \newcommand{\LangCVarM}{\CLang_{\mathsf{Var}}} % C0
 \newcommand{\LangCIf}{$\CLang_{\mathsf{If}}$} %C1
 \newcommand{\LangCIfM}{\ensuremath{\CLang_{\mathsf{If}}}} %C1
-\newcommand{\LangVec}{$\Lang_{\mathsf{Vec}}$} %R3
-\newcommand{\LangVecM}{\Lang_{\mathsf{Vec}}} %R3
-\newcommand{\LangStruct}{\ensuremath{\Lang^{\mathsf{Struct}}_{\mathsf{Vec}}}} %\Lang^s3
-\newcommand{\LangCVec}{$\CLang_{\mathsf{Vec}}$} %C2
-\newcommand{\LangCVecM}{\CLang_{\mathsf{Vec}}} %C2
-\newcommand{\LangVecANF}{\ensuremath{\Lang^{\mathsf{ANF}}_{\mathsf{Vec}}}} %R3
-\newcommand{\LangVecANFM}{\Lang^{\mathsf{ANF}}_{\mathsf{Vec}}} %R3
+\newcommand{\LangVec}{$\Lang_{\mathsf{Tup}}$} %R3
+\newcommand{\LangVecM}{\Lang_{\mathsf{Tup}}} %R3
+\newcommand{\LangStruct}{\ensuremath{\Lang^{\mathsf{Struct}}_{\mathsf{Tup}}}} %\Lang^s3
+\newcommand{\LangCVec}{$\CLang_{\mathsf{Tup}}$} %C2
+\newcommand{\LangCVecM}{\CLang_{\mathsf{Tup}}} %C2
+\newcommand{\LangVecANF}{\ensuremath{\Lang^{\mathsf{ANF}}_{\mathsf{Tup}}}} %R3
+\newcommand{\LangVecANFM}{\Lang^{\mathsf{ANF}}_{\mathsf{Tup}}} %R3
 \newcommand{\LangAlloc}{\ensuremath{\Lang_{\mathsf{Alloc}}}} %R3'
 \newcommand{\LangFun}{$\Lang_{\mathsf{Fun}}$} %R4
 \newcommand{\LangFunM}{\Lang_{\mathsf{Fun}}} %R4