[Openmcl-devel] Compiler warnings
ron at flownet.com
Tue Oct 20 05:51:18 UTC 2009
(cc'ing the list because this issue comes up regularly)
On Oct 19, 2009, at 6:51 PM, Waldek Hebisch wrote:
>> Yes, but it is defensible behavior in light of what the spec says,
>> namely (section 188.8.131.52.1):
>> "If a form is a symbol, then it is either a symbol macro or a
>> "If a form is a symbol that is not a symbol macro, then it is the
>> of a variable, .... There are three kinds of variables: lexical
>> variables, dynamic variables, and constant variables."
>> Since a "naked" symbol that is not bound and has not been DEF...ed is
>> clearly not a lexical variable nor a constant variable, one could
>> reasonably conclude that it must be a dynamic variable.
> Equally well one can conclude that sybol which is not a constant,
> and been DEF...ed is not a dynamic variable so it must be lexical.
> In other words, resonable meaning of SETF is to "create" global
> lexical variable.
That would be true if CL had global lexical variables. But it
doesn't. The only global lexical construct CL has (for symbols) is
the symbol macro.
Adding global lexicals in a way that is consistent with other parts of
the spec is not trivial. For example, one might expect to be able to
(setf x 1)
(symbol-value 'x) -> 1
but the spec specifically forbids this: "symbol-value cannot access
the value of a lexical variable."
More information about the Openmcl-devel