7.3.4 Using packages in interpreted and compiled code

7.3.4.6 Package rule 7

You should not put theprovide statement before the main contents of the file. Consider, for example, what would happen if some dynamic event occurs to put you in the Lisp Debugger just after theprovide statement is executed but well before the main facilities of the module are loaded; asynchronous keyboard interrupts can do this as well as explicit error signals from the Lisp system. Then suppose you try some actions thatrequire the allegedly provided module, and you perform some information-losing operations based upon the assumption that the module was already loaded. When you finally find out that you cannot proceed, such as by calling a function defined in that module but not yet loaded, it will be too late to back out of the information-losing operations.

Though CLtL2 directly allows that a module can be spread out over several files or can encompass files in several different packages, it never implies even indirectly that having twoin-package commands in a single file is a good idea.


The Advanced User's Guide - 9 SEP 1996

Generated with Harlequin WebMaker