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


I approve of SPECIAL-VARIABLE-TEST:SPECIALP (except why isn't

For the current practice section: Symbolics Genera has a function
named SYS:SPECIAL-VARIABLE-P that does this.  The function is not
documented, currently, probably because we've been waiting to see
if Common Lisp standardizes on a different name.

After looking at our SYS:SPECIAL-VARIABLE-P, I note a possible oversight
in this proposal.  With Common Lisp, as opposed to Zetalisp, scoping
rules for SPECIAL declarations, there are two distinct questions one can
ask about the declaration of a variable.  One is, "would a reference to
this variable in this environment be special?".  The second is, "would a
binding of this variable in this environment be special?".  The proposal
only answers the first question.

The second question is a little harder because you need to figure out
how to feed local declarations attached to the binding to the predicate.
I suggest a very simple solution: to ask the second question, one
supplies NIL as the environment, which accesses the proclamations
without the declarations, and then one handles manually any local
declarations attached to the binding.  This is minimalist but should
do the job.  The proposal doesn't need any technical changes for this,
but should include a brief mention of this issue and the solution.