Dan Sugalski writes:
: Does that mean, then, that when module A does a "$C::bar = 1" it affects a 
: different package namespace than module B doing a "$C::bar = 2"?

Presumably.

: And does it also extend to things like this:
: 
:     package A;
:     use C 1.2;
:     package B;
:     use C 1.4;
: 
: where two packages in the same file use different versions of module C and 
: get them?

I expect that could also be made to work, provided the semantics of
importation remain package-scoped and don't become lexically scoped.

To me, it really just means that the *real* name of the package includes
the implementation (author?) and version, but that when you say

    use C;

you're just choosing to wildcard both the implementation and version.
This view says that we probably ought to figure out how to encode the
implementation and version syntactically as part of the package name,
rather than as a 3rd argument to use.

Think about the long names of fonts for an example of how far this
can be taken.

Larry

Reply via email to