- The environments play absolutely no role in this simplified V1 interpreter. In the
- fuller code, they have a limited role in the V1 interpreter. In the V2 interpreter,
- the environments are essential.
+ The two interpreters presented below are (VersionA) a substitute-and-replace
+ interpreter, and (VersionB) an environment-based interpreter. We discuss the
+ differences between these in the course notes.
+
+ The implementeations we provide make both of these call-by-value. When given
+ a term `App(head, arg)`, the steps are: first, reduce or evaluate
+ `head`---it might involve further `App`s itself. Second, reduce or evaluate
+ `arg`. Third, only _when_ `arg` reduces or evaluates to a result value, then
+ "perform" the application. What this last step amounts to is different in
+ the two interpreters. Call-by-name interpreters would "perform" the
+ application regardless, and without even trying to reduce or evaluate arg to
+ a result value beforehand.
+
+ Additionally, these implementations assume that free variables are "stuck"
+ terms rather than result values. That is a bit inconvenient with this
+ simplified program: it means that Lambdas (or Closures, in VB) are the only
+ result values. But in the fuller code from which this is simplified, it
+ makes more sense, because there we also have literal number and boolean
+ values as results, too.
+
+ The environments play absolutely no role in the simplified VA interpreter
+ presented here. In the fuller code, they have a limited role in the VA
+ interpreter. In the VB interpreter, the environments are essential.