[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Issue: SPECIAL-VARIABLE-TEST (Version 1)
- To: Kent M Pitman <KMP@STONY-BROOK.SCRC.Symbolics.COM>
- Subject: Issue: SPECIAL-VARIABLE-TEST (Version 1)
- From: David A. Moon <Moon@STONY-BROOK.SCRC.Symbolics.COM>
- Date: Mon, 7 Mar 88 15:53 EST
- Cc: CL-Cleanup@SAIL.STANFORD.EDU
- In-reply-to: <880307153239.3.KMP@RIO-DE-JANEIRO.SCRC.Symbolics.COM>
Date: Mon, 7 Mar 88 15:32 EST
From: Kent M Pitman <KMP@STONY-BROOK.SCRC.Symbolics.COM>
Date: Mon, 7 Mar 88 13:59 EST
From: David A. Moon <Moon@STONY-BROOK.SCRC.Symbolics.COM>
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.
This sounds mostly ok, though we'd need to be clear about which of these
an appropriate type-2 call to SPECIAL-VARIABLE-P looked like:
1. (SPECIAL-VARIABLE-P 'FOO '((DECLARE (SPECIAL X) (FIXNUM X))
(DECLARE (SPECIAL Y))))
2. (SPECIAL-VARIABLE-P 'FOO '(DECLARE (SPECIAL X) (FIXNUM X) (SPECIAL Y)))
3. (SPECIAL-VARIABLE-P 'FOO '(((SPECIAL X) (FIXNUM X)) ((SPECIAL Y))))
4. (SPECIAL-VARIABLE-P 'FOO '((SPECIAL X) (FIXNUM X) (SPECIAL Y)))
5. (SPECIAL-VARIABLE-P 'FOO '(X Y))
Huh? I was proposing that the second argument to SPECIAL-VARIABLE-P
would be NIL and the caller would have to do his own declaration parsing.
Thus (OR (SPECIAL-VARIABLE-P var NIL) (MEMBER var parsed-special-dcls)).
If we wanted a function to help compute parsed-special-dcls, that would
be a separate function. I'm not sure we need one as part of the Common
I note also that this only works because special bindings are not
Yes, in Zetalisp they are pervasive and the issue does not arise, since
the two questions yield the same answer.