How to decide what to kill / packages



>>>>> "Martin" == Martin RUBEY <rubey@labri.fr> writes:

    >> Other than interning ar in a possibly different package, what are we
    >> trying to do here?  Do you want the user to be able to put things in
    >> his own package?  I think we need some careful design before this
    >> happens. 

    Martin> OK, I probably misunderstood everything. What I thought was that implode1 
    Martin> would put "new stuff" into the *current-package* package. I.e. 
    Martin> I thought, if foo was defined while *current-package* is pack1, after that 
    Martin> *current-package* becomes pack2 and another foo is defined, then the old 
    Martin> definition of foo is kept, but maxima would look in *current-package* 
    Martin> first. You see, I should probably keep my mouth shut.

Yes, this is basically how it would work.

    Martin> Well, somebody please explain Lisp packages to me...
    >> 
    >> Very roughly and briefly, a Lisp package is a way separating names
    >> (symbols).  Every symbol lives in some package.  That's about all it
    >> does.

    Martin> Well, that's just about I how I thought it was. What I'd like to know,
    Martin> where does Lisp look for a symbol, in which order. If there are several
    Martin> package used at some time, what happens with conflicting definitions? I
    Martin> know I can select a particular one by package:foo, but what happens if I
    Martin> don't?

If no explicit package qualifier is given, then it looks in *package*.
If a qualifier is given, then look there.  Also, note that package:foo
implies that foo has been exported (made "public") from the package.
Otherwise, you have to use package::foo.  But this usually means that
foo is internal to the package and you shouldn't be using that.

Ray