Quick comparison of two Namespaces proposals
goran at krampe.se
Wed Sep 19 08:03:01 UTC 2007
> On 9/19/07, goran at krampe.se <goran at krampe.se> wrote:
>> "Michael van der Gulik" <mikevdg at gmail.com> wrote:
>> > What do you mean by several packages defining names in the same
>> > Are you talking about method overrides? Then like I said before, I
>> > work out how to do this without creating a security issue (I'm
>> > Packages containing completely untrusted code which can be securely
>> > d locally).
>> I am not talking about method overrides, no. I am simply talking about
>> package P1 defining a class X in N1 and package P2 defining class Y in
>> N1. Nothing magical. :)
> My implementation handles this fine. In this case, you'd have P1
> N1::X (using Krampe notation) and P2 containing N1::Y. The import list of
> your code using X and Y would include P1 and P2 (import lists contain only
> other Namespaces, and Packages are Namespaces).
If I understand you correctly (there are lots of assumptions here that I
am not totally getting) - you are saying:
- Package IS a Namespace.
- Two packages CAN define names in the same namespace.
I may be daft but I don't get it. So P1 "contains" N1 and so does P2? And
a package IS a Namespace? So N1 can appear in multiple places in your
hierarchy, is that what you mean?
More information about the Squeak-dev