Peter Thiemann před 3 roky
rodič
revize
f61a872936
1 změnil soubory, kde provedl 8 přidání a 8 odebrání
  1. 8 8
      book.tex

+ 8 - 8
book.tex

@@ -16249,7 +16249,7 @@ not (False if input_int() == 1 else 0)
 
 Languages that allow expressions to produce different kinds of values
 are called \emph{polymorphic}, a word composed of the Greek roots
-``poly'', meaning ``many'', and ``morph'', meaning ``shape''.  There
+``poly'', meaning ``many'', and ``morphos'', meaning ``form''.  There
 are several kinds of polymorphism in programming languages, such as
 subtype polymorphism and parametric
 polymorphism~\citep{Cardelli:1985kx}. The kind of polymorphism we
@@ -16265,8 +16265,8 @@ given anything else it returns \FALSE{}.
 
 Furthermore, even when primitive operations restrict their inputs to
 values of a certain type, this restriction is enforced at runtime
-instead of during compilation. For example, the following tuple read
-operation results in a run-time error because it requires a tuple, not
+instead of during compilation. For example, the following expression
+results in a run-time error because referencing a component requires a tuple, not
 a Boolean such as \TRUE{}.
 %
 {\if\edition\racketEd
@@ -16400,8 +16400,8 @@ The concrete and abstract syntax of \LangDyn{}, our subset of
 \racket{Racket}\python{Python}, is defined in
 Figures~\ref{fig:r7-concrete-syntax} and \ref{fig:r7-syntax}.
 %
-There is no type checker for \LangDyn{} because it is not a statically
-typed language (it's dynamically typed!).
+There is no type checker for \LangDyn{} because dynamically typed
+languages check types at runtime.
 
 The definitional interpreter for \LangDyn{} is presented in
 \racket{Figure~\ref{fig:interp-Ldyn}}
@@ -16460,14 +16460,14 @@ If they are not, a \code{trapped-error} is raised.  Recall from
 Section~\ref{sec:interp_Lint} that when a definition interpreter
 raises a \code{trapped-error} error, the compiled code must also
 signal an error by exiting with return code \code{255}.  A
-\code{trapped-error} is also raised if the index is not less than
+\code{trapped-error} is also raised if the index is not less than the
 length of the vector.
 }
 %
 \python{If they are not, an exception is raised.  The compiled code
   must also signal an error by exiting with return code \code{255}.  A
-  exception is also raised if the index is not less than length of the
-  tuple.}
+  exception is also raised if the index is not less than the length of the
+  tuple or if it is negative.}
 
 \begin{figure}[tbp]
 {\if\edition\racketEd