[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
special declaration
As an implementor, I would be only too happy to flush the current
(incomplete) tests for SPECIAL declarations in favor of something
that is in the lambda list. The idea of using the pname is
obviously a bad one, but I don't see any problem with things
such as
(foo &special bar)
(foo (special bar))
(foo #$bar)
I would much prefer these to the current situation, and the sooner
the better... At the moment there probably isn't a large body of
CL code yet. It is just barely possible to make changes like this
now. Shortly it will not be practical. I assert that it is
possible to do a mechanical translation from the old to the new
form, particularly for implementations that don't yet handle
macros that expand to declarations. I have thought of one case
that this can't handle, but it is probably so pathological that
we can ignore it.
------------------------
Appendix. A pathlogical case.
In order to assure portability, it might be helpful to make sure
that code can run in implementations that use lexical binding
and in implementations that use dynamic binding. For this
purpose, we will declare all of our variables using the
macro SOMETIMES-SPECIAL. This will declare all of its arguments
special when the day of the month is odd, and otherwise expand
to NIL.
-------