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


    Date: Fri, 21 Oct 88 19:49:49 PDT
    From: Jon L White <jonl@lucid.com>

    The source of much confusion here has long been that TYPE declarations had 
    to be treated differently from all other declarations; this was  because of 
    the crazy prohibition found on p158 of CLtL.  Let's assume for now that 
    DECLARE-TYPE-FREE is accepted; then I think we can just flush all crazy 
    categorizations into "pervasive"/"non-pervasive" and  "free"/"bound" and 
    simply say that declarations:
      (1) always include the lexical scope of the body of the special form 
	  in which  they are found;
      (2) and furthermore, they also include the scope of the name-bindings, 
	  if any, to which they apply.  [LET, LAMBDA, FLET, and LABELS 
	  introduce "name bindings"; LOCALLY doesn't.]
    Since the scope of a "name-binding" also includes the body as mentioned
    in (1), then the only additional comment needed concerns LET* and LABELS.

JonL, this makes me really angry.  I feel like I have explained this ten
times, but it never seems to get through to you.  I've started to reply
to this several times, but cancelled it.  I hope the following is
a calm and understandable explanation of the issue.  Please read it.

First of all, the "free"/"bound" distinction isn't some crazy
categorization that we can just remove.  It means exactly the same
thing as your phrase "the name-bindings, if any, to which they apply".
As long as we have in the language both declarations that are attached
to bindings and declarations that are not attached to bindings, we have
a "free"/"bound" distinction, whether we like it or not.  If we don't
like those names, we could use other ones, although those are the
standard names for the concepts; however, changing the name won't
eliminate the issue.

But that's not the major point.  The major point is your claim that it's
obvious that the scope of a free declaration should be just the body of
the special form, and not include any additional code, such as
initialization forms.  Perhaps we would choose to adopt this after
discussion, but it's not obviously correct, it's not obviously simpler
than setting the scope to the entire special form, and most importantly
it is an incompatible change, directly contradicting the scope defined
by CLtL for the FTYPE, INLINE, NOTINLINE, and OPTIMIZE declarations,
and for the SPECIAL declaration when not attached to a variable binding.
My reason for preferring that the scope of a free declaration is the
entire special form is to avoid an incompatible change.

If you don't see that, look at the "defun few" example in the middle
of page 155 of CLtL.