References: CLtL p. 182, 183
Category: CHANGE, CLARIFICATION
Edit History: 1 Sep 1988, Sandra Loosemore (initial version)
21 Sep 1988, Sandra Loosemore (minor tweak to current practice)
The variable *PACKAGE* is rebound by the function LOAD, so that its
old value will be restored in spite of any calls to IN-PACKAGE
appearing in the file being loaded. Since COMPILE-FILE must evaluate
any top-level calls to IN-PACKAGE that it sees, it may also alter the
value of *PACKAGE*. It is inconsistent to have COMPILE-FILE and LOAD
behave differently regarding the rebinding of this variable.
Require COMPILE-FILE to rebind *PACKAGE* before processing the file.
This makes COMPILE-FILE and LOAD more consistent. It is a more
compatible solution than either requiring LOAD not to rebind
*PACKAGE*, or removing the specialness of IN-PACKAGE and the other
Lucid Common Lisp, the TI Explorer, and VaxLisp already implement this
Cost to implementors:
Cost to users:
I find it hard to believe that users would consider COMPILE-FILE altering
the value of *PACKAGE* as a useful side effect.
The language is made more uniform.