[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: help with CLtL1/CLtL2 packages



> 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
                    haible@ma2s2.mathematik.uni-karlsruhe.de