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

Issue: IN-PACKAGE-FUNCTIONALITY (Version 3)



re: Rationale:
     This could allow improved error checking and modularity, with only 
     minimal loss of functionality. Any call to IN-PACKAGE which really 
     needed to demand-create a package could be rewritten as a DEFPACKAGE 
     followed by an IN-PACKAGE.

I think this part needs some more thought.  Maybe the second sentence
doesn't belong in a Rationale.  Note that unless the file begins with an 
IN-PACKAGE, then the DEFPACKAGE form will be read into totally random 
package, doing who knows what sort of damage.

Ideally, every file of a multi-file module should begin with an
IN-PACKAGE form to get "in" that module's package.  The exceptions
are files which might as start out (IN-PACKAGE "USER").   For example, 
the package creator file might look something like:

    (in-package "USER") 	;guaranteed to exist, and not be harmful!
    (defpackage :phlogiston ...)

Another exception might be the DEFSYSTEM surrogate, which also would
start out in the USER package, and simply load the rest of the files.


-- JonL --