[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: Scott E. Fahlman <Fahlman%CMU-CS-C@SU-DSN>
- Subject: package.mss.108
- From: David A. Moon <Moon%SCRC-TENEX%MIT-MC@SU-DSN>
- Date: Thu, 12 May 1983 02:09:00 -0000
- Cc: Common-Lisp@su-ai
- In-reply-to: The message of 11 May 83 15:22-EDT from Scott E. Fahlman <Fahlman at CMU-CS-C>
Date: Wed, 11 May 1983 15:22 EDT
From: Scott E. Fahlman <Fahlman@CMU-CS-C>
I'm still a little unclear on how the
error-cheking in declare-package would be handled when a package is loaded
from multiple files (as the LISP package would be, for instance).
I guess the real issue is here is not so much multiple files as the
setting up of a package's externals by a bunch of separate EXPORT
"statements" rather than by a :EXPORT keyword to MAKE-PACKAGE (or
whatever we call it), which is what I had assumed without thinking about
it. Thus you don't really know when a package is all loaded so that you
can error-check any declares that may have been done.
To you, this means that the error checking is useless. To me, it means
declare-package is a kludge. I'm not sure what we should do about this.
If all else fails you could just put in a function that is called explicitly
to do the error checking, and try to encourage people to put it at the end of
their program or wherever.
But note that in the example on p. 292 of the Laser edition of two programs
that depend on each other, it appears that what you are expected to do is
in this order:
1. Make your package
2. Do your export statements
3. Do your require statements, loading anything you need
4. Do your use statements, maybe adding what you just loaded to your package
The key thing here is that the export statements are all done -before- anyone
tries to look at the package from the outside, getting rid of the loading order
issues. I guess it's up to you what style you want to promote. Since my style
is to put all the package setup forms in separate files from the code, avoiding
any issue of loading order dependency entirely, it doesn't matter to me.