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

defpackage



While I would like to see a single DEFPACKAGE construct replace the 
seven random forms, there are some problems with the order in which
things happen.  Namely, since the reader would normally read the entire
DEFPACKAGE form before actually doing any of the actions it specifies,
how do you specify symbols that are to be imported or exported when
their home packages have not been created yet (perhaps because these
packages would be created during evaluation of the "require" part of
the DEFPACKAGE)?  Although I don't recall that CLtL actually says
anything explicit on this point, in most implementations the reader will
signal an error if it sees an unknown package prefix on a symbol.

The best way to deal with packages that I have found so far is to use 
a small DEFSYSTEM utility, and to put all the stuff to set up the
package environment for the system (including loading in of other
systems that create packages it references) at the beginning of the
file that contains the system definition.

-Sandra
-------