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

PROCLAIM [and "lexical scoping"?]

I tend to agree with your feelings about non-DEFUN forms in a file -- that
it's undesirable to have them all implicitly eval-when(eval compile).

At worst, one might want to include PROCLAIM in with the 7-extremely-randoms
-- perhaps as the eighth wonder of the randomness world.

On the other hand, I see lots of need for a lexical file proclaim.  This
would be a good time to define something that has DECLARE syntax (i.e.,
isn't a function that "evaluates its arguments") but which also has
PROCLAIM pervasiveness within a file.  The reason I call it "lexical file
proclaim" is that I want it to affect only the lexically-apparent code in 
the file in which it is found at top level (for whatever it means to be "at
top level").  So unlike current PROCLAIM, it would not affect the evaluation
of random Lisp forms during, say, macro expansion, or during a sub-recursive
call to COMPILE-FILE, etc.  On the other hand, unlike current semantics for 
(LOCALLY (DECLARE (SPECIAL ...)) ...), it's effect would be "pervasive".

Would information from "lexical, file-proclaim" affect the code produced
by macroexpansions?  after all, such code isn't "lexically apparent" in
the file?  This issue is no different than the current controversy about
whether macro-expansion produced code should be "captured" by the
lexical environment surrounding it, or whether it should be insulated
 from it.  Thus this controversy should be left to the macro committee,
or whatever other body addresses it; it's independent of compile-file

What is a file such that "lexical file-proclaim" makes sense.  Again,
I think the answer is to defer to COMPILE-FILE; whatever it thinks a
"file" is, then that is what the scope of "lexical file-proclaim" is.

-- JonL --