[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Issue: DEFPACKAGE (Version 7)
- To: peck@Sun.COM
- Subject: Issue: DEFPACKAGE (Version 7)
- From: Jon L White <email@example.com>
- Date: Thu, 12 Jan 89 04:16:52 PST
- Cc: masinter.pa@Xerox.COM, barmar@Think.COM, CL-CLEANUP@sail.stanford.edu
- In-reply-to: peck@Sun.COM's message of Wed, 11 Jan 89 18:21:37 PST <8901120221.AA08867@denali.sun.com>
Here's an excerpt from Version 7:
It is noted that DEFPACKAGE cannot be used to create two "mutually
recursive" packages, such as:
(:use lisp your-package) ;requires 'your-package' to exist first
(:import-from my-package "MY-FUN") ;requires 'my-package' to exist first
However, nothing prevents one from using the package-effecting functions
such as USE-PACKAGE, IMPORT, and EXPORT to establish such links (which
ought to be very rare) after a more standard use of DEFPACKAGE.
The problem is similar to "defining" a circular list; typically you
have to start out with a non-circular "definition" [e.g., such as
by (CONS 'A NIL)] and then make a circularizing step [e.g., such as
(RPLACD X X)].
Your two-pass approach would *probably* work in many reasonable
implementations, even though the two passes would be "at variance"
by the definitions given previously. The problem still seems to
be that we "ran out of time" before agreeing on how to reconcile
two defpackage calls that weren't basically the same.
-- JonL --