7.3.4 Using packages in interpreted and compiled code Package rule 2

While Lisp allows you to modify the package structure "on the fly," you can end up in a very difficult situation if you are not careful. You should consider all of the functions that affect packages--the six mentioned in this rule along withunintern,unexport,unuse-package,intern, andmake-package--as being damaging in that they have global side effects. By using package operations in the order presented in this rule, you can focus the side effects resulting from package creation into one controlled place; thus, you do not have to contend with two different states that might be in conflict.

The package creation operations must be visible to the Compiler. If they appear at the top level in a file, the Compiler ensures that they are executed at compile time as well as at load time. If the Compiler cannot discern the appearance of these operations, you should wrap the form invoking them in aneval-when (compile...) construct.

The Advanced User's Guide - 9 SEP 1996

Generated with Harlequin WebMaker