[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: questions about packages
Date: Thu 9 Jan 86 20:08:03-MST
From: SANDRA <LOOSEMORE@UTAH-20.ARPA>
To: common-lisp@SU-AI.ARPA
Subject: questions about packages
Message-ID: <12174001594.14.LOOSEMORE@UTAH-20.ARPA>
1. Can a package use itself? Or is this "an error"?
Yes. A package can use itself (though an error may be signalled due to name
conflicts).
2. Does the :use argument to in-package default to the list of the
lisp package in the same way that it does for make-package? In
other words, if you do (in-package 'foo) and package foo does not
yet exist, does it default to using the lisp package? What if
package foo does exist but doesn't already use the lisp package?
Hmmm...Good Question. "This function is similar to MAKE-PACKAGE" should be
made more explicit. I think the intent here is that if :USE was
actually an argument to IN-PACKAGE it is merely passed on to the call
to MAKE-PACKAGE (in the case of FOO not existing); if it wasn't an
actual arg. to IN-PACKAGE, MAKE-PACKAGE is called with no :USE arg.
(and hence :USE defaults to '(LISP)). In the case where FOO existed,
if :USE is not an actual arg. to IN-PACKAGE, :USE defaults to '().
-- Nick