Re: Declaring *print-case* special in SBCL seems broken
- From: "Nikodemus Siivola" <nikodemus@xxxxxxxxxxxxxxxx>
- Date: 31 May 2006 02:03:21 -0700
Ron Garret wrote:
Christophe Rhodes <csr21@xxxxxxxxx> wrote:
10. Declaring or proclaiming it special (via declare, declaim, or
proclaim).
I'm not aware of an exception in the standard.
Well, there's this:
11.1.2.1.2.1 Some Exceptions to Constraints on the COMMON-LISP Package
for Conforming Programs
In particular:
"...if an external symbol of the COMMON-LISP package is globally defined
as a standardized dynamic variable, it is permitted to bind or assign
that dynamic variable..."
Says absolutely nothing about declarations, so the point is moot. (And
SBCL indeed allows you to bind and assign these variables as the
chapter and verse you site requires.)
There's also common sense: in light of the fact that *print-case* is a
dynamic variable, declaring it special is a no-op and thus ought not to
be an error.
Now THIS is a perfectly valid point.
My reasoning in making the package locks disallow this (IIRC) involved
two main factors:
1. Less exceptions to the rules. The CLHS rules which serve as
foundations for the package locking rules are already complicated
enough. Adding one more exception would in this case have lessened the
transient pain, but made mastery
of the full ruleset more difficult.
2. What is the user trying to do? Declaring a special a special is not
just a no-op, but also nonsensical, and it seems likely that the user
is trying to do something misguided, so an early warning is
likely to be a good idea. (Notably, if you are building a binding
construct that implicitly declares everything locally special it would
definitely be a good idea to not do that to symbols in the COMMON-LISP
package.)
If you disagree with either of these I'm quite interested in hearing
about it, but preferably on sbcl-devel.
Cheers,
-- Nikodemus Siivola
.
- References:
- Declaring *print-case* special in SBCL seems broken
- From: Ron Garret
- Re: Declaring *print-case* special in SBCL seems broken
- From: Christophe Rhodes
- Re: Declaring *print-case* special in SBCL seems broken
- From: Ron Garret
- Declaring *print-case* special in SBCL seems broken
- Prev by Date: Re: (let ((C call-with-current-continuation))
- Next by Date: Re: SBCL on OS X - bad magic number in core file?
- Previous by thread: Re: Declaring *print-case* special in SBCL seems broken
- Next by thread: Re: Declaring *print-case* special in SBCL seems broken
- Index(es):
Relevant Pages
|