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

Bug in R3RS

I believe there is a bug in the R3RS specification of SET! (p. 8). It says that
"<Variable> must be bound in some region enclosing the SET! expression or at 
top level."  I believe that the reference to "top level" is either superfluos
or in error.  If the top level environment is a lexically enclosing environment
then the reference is superfluos, and if the "top level" environment is not 
lexically apparent (I am not even sure if this is possible given the current
environment semantics.) then it is presumably in error.  This definition 
becomes particularly onerous if we adopt some form of first-class environments
as then there is a distinct possibility that a SET! could be performed in an
environment that is not a child of "the top level" environment.  I therefore
propose substituing the following wording for the above sentence:
"<Variable> must be bound in an enclosing lexical environment."  Obviously,
adoption of first-class environments with multiple parents would require
yet further refinement of this sentence.
                                        Morry Katz