Movatterモバイル変換
[0]ホーム
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]package.mss.108
- 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 thesetting up of a package's externals by a bunch of separate EXPORT"statements" rather than by a :EXPORT keyword to MAKE-PACKAGE (orwhatever we call it), which is what I had assumed without thinking aboutit. Thus you don't really know when a package is all loaded so that youcan error-check any declares that may have been done.To you, this means that the error checking is useless. To me, it meansdeclare-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 explicitlyto do the error checking, and try to encourage people to put it at the end oftheir program or wherever.But note that in the example on p. 292 of the Laser edition of two programsthat depend on each other, it appears that what you are expected to do isin this order:1. Make your package2. Do your export statements3. Do your require statements, loading anything you need4. Do your use statements, maybe adding what you just loaded to your packageThe key thing here is that the export statements are all done -before- anyonetries to look at the package from the outside, getting rid of the loading orderissues. I guess it's up to you what style you want to promote. Since my styleis to put all the package setup forms in separate files from the code, avoidingany issue of loading order dependency entirely, it doesn't matter to me.
[8]ページ先頭