7.3.4 Using packages in interpreted and compiled code

7.3.4.5 Package rule 6

In general, where an argument is specified to be a package, you can use a package name, including a string; the Common Lisp functionspackage-name andpackage-nicknames are exceptions whose arguments must be packages. Consider the following form:

(in-package "APPLICATION" :use 'phlogiston::sophistry)
If the list of packages used by the current package differs between compile time and load time, this expression might produce problems. The following form prevents hidden problems from occurring:

(in-package "APPLICATION")
(use-package "SOPHISTRY")

Similarly, if the current package uses thealchemy package, the form(shadow 'alchemy::car) is equivalent to(shadow 'car). These two forms certainly are not equivalent in a load-time environment wherecar is already a shadowing symbol in the current package. To avoid havingshadow prefer one symbol over another, use a string:

(shadow "CAR")
You can also use a symbol with a package qualifier that is guaranteed to be unambiguous, such as a keyword symbol or an uninterned symbol.


The Advanced User's Guide - 9 SEP 1996

Generated with Harlequin WebMaker