advice on using packages



-----Raymond Toy wrote: -----

>    Barton> (Q1) Is all this :import stuff really
>needed?
>
>I think it would work without the :import-from,
>since you're :use'ing :maxima already.  That is,
> no package qualifiers needed to refer to a
>symbol in the maxima package.

In GCL, it doesn't seem to work that way:

MAXIMA> (defpackage :my (:use :common-lisp :maxima))
#<"MY" package>
MAXIMA> (in-package :my)
#<"MY" package>
MY> (add 5 6);
Maxima encountered a Lisp error:
 Error in EVAL [or a callee]: The function ADD is undefined.
Automatically continuing.
To reenable the Lisp debugger set *debugger-hook* to nil.
MY> (maxima:add 5 6);
Maxima encountered a Lisp error:
 Error in READ [or a callee]: Cannot find the external symbol ADD in
#<"MAXIMA" package>.
Automatically continuing.
To reenable the Lisp debugger set *debugger-hook* to nil.
MY> 5
MY> 6
MY> (maxima::add 5 6);
11

>I think you would typically be in the maxima
>package and access stuff
>from your MY package.  Of course, you'd have to
>use package qualifiers
>(my::foo) to access them, unless you tell maxima
>to :use your package.

Oh--I understand. Thanks.
Barton