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

Package system

One must use the package system in a very restricted way in order for
compilers, editors, and other (mostly not-yet-existent) program
transformation tools to do reasonable things.  During the design of the
package system, I don't think that anyone was under the delusion that
arbitrary common lisp code sequences that manipulate the package system
(or do a large number of other things) would behave the same compiled
as interpreted.

The package chapter should probably have had more to say about this,
and should not have documented the "conventional use of the package
system", which is very important for preserving sanity, in the
"example" subsection.  Somewhere, relatively simple restrictions on the
use of the package system should be precisely described, so that users
can distinguish code that will work from code that might not, and
portable code from non-portable code.

Why does the editor problem have to be so hard?  It seems to me that if
programmers would make the call to in-package be the first lisp form in
the file, the editor would have no more trouble setting up the proper
package context than it would with the magic comment crock.

I also think that if complex package structures turn out to be really
necessary (which I am not convinced of), a number of standard ways to
deal with them could be developed so that a user could be reasonably
assured of not getting screwed, AND editors, compilers, and so on,
would be able to understand what is going on, all within CL.