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

Request for clarification about "package users/owners"



    "...  I don't like the idea of package A exporting symbols from 
     package B; what if there is a typographical error, a conceptual mistake,
     or an obsolete symbol in the list supplied by package A, which is a 
     duplicate of package B's list?..."

    "...I don't see how the "owner vs. user" error checking that you advocate
     can work unless you require that the exporting package be loaded before
     the using package (in which case the user doesn't need to declare the
     package at all)..."

    "What I object to ... is the notion that any of these operations,
     when performed in package X, have to worry about what's going on down
     in the descendant packages..."

To paraphrase a popular slogan,...

  Packages don't export symbols, programs export symbols.

Programs have meaning even (especially) after all its symbols have been
seen and interned by READ, and possibly after the binding of *PACKAGE*
has gone away. A program does not exist "in a package". The names of the
entry points into a package are the only thing which are in the package.
Anything else is simply code which sets up or implements some feature 
which allows that entry point does what it does, but properly speaking
that code has nothing at all to do with packages. There is certainly no
property about the code from a file which says "I am in the ... package."
At best, packageness is a property of a written program's syntax. Not
all programs, however, are written. Some, for example, are consed on the
fly. Some, perhaps, are even compiled on the fly.

I acknowledge Moon's concern about users vs owners of packages having
various rights which may not be equivalent; I don't here want to take a
stand on that issue. My real aim is to say that I am not sure I agree
that it is trivially obvious what it means for one to be "in a package"
or not in one, so the idea of error checking or otherwise controlling 
it seems exceedingly tricky/ill-defined.

I hope my question is clear. It may well be that you mean something
completely reasonable, but if so, I am not sure what that might be.
If this message isn't clear, send me private mail and I'll clarify
the question in greater length ... 
--kmp