[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Issue: PROCLAIM-LEXICAL



We feel that the exposition preceding Moon's proposal contains some
assumptions which lead him to conclusions with which we're somewhat
uncomfortable.

Although the proposal is coherent and we don't think it's technically
unworkable, we're not really happy with the conceptual model of
special binding which it seems to presuppose.

Apparently, I (JAR) have been hacking denotational semantics so long
that the way that Lisp hackers think is now completely foreign
to me.  Moon's notion of a "cell" feels very unnatural, for example.
Were I to write a Common Lisp EVAL in a less complicated language,
e.g. lambda calculus, Pascal, or Scheme, I would start as follows:

    (defun eval (exp lexical-env dynamic-env store cont)
      (cond ((symbolp exp)
	     ...)
	    ...))

In this notation, a DYNAMIC-ENV maps names to locations, and a STORE
(British word for memory) maps locations to values.  This makes clear the
exact manner in which the "meaning" of a variable depends on the context
(dynamic, lexical, and prior side-effects) in which it occurs.  It looks
like Moon's notion of a "cell" bundles these two mappings in some way,
but it's not completely clear how.  It would be interesting to see how
Moon would write EVAL (using UNWIND-PROTECT perhaps?) in a language that
had no side effects or dynamic binding.

The intent here is not to convince anyone that some particular
model is right or wrong, but to point out that there's more than one
valid way of modeling all this.  Moon's proposal follows neatly from
the exposition which precedes it, but since we're not happy with the
exposition, it's not surprising that we're not happy with the
proposal.

One particular point of contention: we're uneasy about Moon's suggestion
that binding a special variable can affect the evaluation of a lexical
variable.  This is an example of how a bias toward a shallow-binding model
shows through.

These remarks are too brief and we expect to have more to say on
this later, but since Larry's probably making up a status report for
presentation to X3J13, and since the comments on Moon's proposal have
thus far been non-critical, we wanted to get it into the record that
we think there's more work to be done here.