Subject: Re: help with CLtL1/CLtL2 packages

From: haible (Bruno Haible)
Date: Fri, 27 Jan 95 15:32:05 +0100

> I believe that the most incompatible change from CLtL1 to CLtL2 was
> the modification of IN-PACKAGE.

And I believe it was the change of the scope of declarations.

> CLtL2 p.272 says that "The existing package is modified, if
> possible, to reflect the new definition."

Yes. In clisp, this means that UNUSE-PACKAGE or UNEXPORT may be called if
the new definition lacks some clause that was present in the old definition.

> More symbols will be exported by later files and even at run-time.

Then the DEFPACKAGE macro is not what you want. The EXPORT, IN-PACKAGE, etc.
functions will do the job.

> #+CLISP                                 ;has ! built-in in LISP
> (shadowing-import '(ascon:!))

You can get away without this by using package "COMMON-LISP" instead of "LISP.

> (eval-when (load compile eval)
>   (unless (find-package "B-P")
>     (make-package "BGP-MS-PROGRAMMER"

This silly idiom ought to be replaced by  (in-package "BGP-MS-PROGRAMMER" ...)

> On the other hand, I
> can't use (IN-PACKAGE ...) with :NICKNAMES or :USE because this form
> is CLtL1 only.

Then use IN-PACKAGE without args, and put the commands for setting up the
package into a separate file, which you load before.

Hope this helps. This issue isn't easy.

                    Bruno Haible
                    [email-masked]

---

From: [email-masked] (Joerg-Cyril Hoehle)
Date: Fri, 27 Jan 95 16:00:18 +0100

> package into a separate file, which you load before.

The chicken and egg problem. I precisely want to know *what* to put in
a file to get my package defined. I can't load a file to define it to
define it for the file that should define it :-)

 > Hope this helps. This issue isn't easy.
It's been bogging my mind for some time and I need a solution.

 	Joerg Hoehle.
[email-masked]