At 11:11 AM 8/9/00 -0700, Larry Wall wrote:
>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.

Hmmmm. That brings up some issues of ambiguity, then. If you use C in 
package A, and also in package B, which do you see when you're in main and 
access $C::bar?

>: 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.

Sure. They'd have to be, otherwise packages split across different files 
would get a rather bizarre view of the world. This sort of means we'll need 
some sort of two-level stash, one per-package and one global. (Unless 
you're outlawing symbolic references... :)

>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.

Yup. I can see the build procedures needing to know this too, since we'll 
probably need to give modules with shared libraries unique names. Some 
platforms (OS/2 and VMS, at least) will need that, as they get cranky if 
you try and load shareables with the same base filename.

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

Would this be "Taken to its logical and sensible conclusion" or "Taken as 
far as it can possibly go, though it you turn around and look *really* hard 
with binoculars you can see where you crossed the line, way back there by 
the horizon"?

                                        Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai
[EMAIL PROTECTED]                         have teddy bears and even
                                      teddy bears get drunk

Reply via email to