[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Issue: DECLARE-TYPE-FREE (Version 6)
- To: Masinter.pa@Xerox.COM
- Subject: Issue: DECLARE-TYPE-FREE (Version 6)
- From: Jon L White <jonl@lucid.com>
- Date: Tue, 6 Dec 88 19:14:58 PST
- Cc: cl-cleanup@SAIL.Stanford.EDU
- In-reply-to: CL-cleanup@Sail.stanford.edu's message of 5 Dec 88 16:53 PST <881205-165330-4655@Xerox>
I don't see the problem you are trying to fix. As it stands now, it
appears to me that Version 6 is less clear, and less acceptable, than
version 5.
In particular, the notion of "scope" seems fully adequate for explaining
LOCALLY declarations; CLtL didn't find it necessary to invoke the
dichotomy of scope/extent in Chapter 9. The "scope" even of the SPECIAL
declaration is all that is needed to explain the "extent" issue of
special variables.
Also, I thought Kent did an adequate job of replying to jar's query,
and that no substantial criticism was warranted based on them. Jar's
example was:
(let ((x 12) (y 'foo))
(flet ((zap () (rotatef x y)))
(locally (declare (fixnum x))
(zap)
(zap)
x)))
and he was questioning the "extent" issue about the value of X during
the ROTATEF. Kent's reply was:
Not so. The X referenced by ZAP is not in the lexical scope of the locally
declaration. As such, this program is not in error.
and his message further contained phrases as follows:
If you take "A" to refer to "lexical scope", I see no serious
inconsistency here. Some minor wording to be dealt with. Probably it
should say something to the effect of "...for an access to this variable
to occur in the lexical scope and for the resulting value to not to be
of the indicated type".
. . .
The point of this declaration was not to enable the creation of a
specialized home for the variable, so technically it's no trouble for
non-matching values to come and go through mechanisms such as you cite
below. The point of this declaration was, rather, to permit operations
which occur on the contents of the variable within the lexical scope to
be interestingly optimized. eg, . . .
Unless kmp is ready to retract his analysis, then the only need for
emmendation I see is to add the sentence he suggested above.
-- JonL --
P.S. It appears as though there is some mail glitch -- I don't think I
have gotten most of today's replies to Cl-Cleanup. Please bear
with me if it seems I've ignored some clarifying comments anyone
has already made.