<br><br><div><span class="gmail_quote">On 9/19/07, <b class="gmail_sendername">Göran Krampe</b> &lt;<a href="mailto:goran@krampe.se">goran@krampe.se</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi!<br><br>&gt; On 9/19/07, <a href="mailto:goran@krampe.se">goran@krampe.se</a> &lt;<a href="mailto:goran@krampe.se">goran@krampe.se</a>&gt; wrote:<br>&gt;&gt; &quot;Michael van der Gulik&quot; &lt;<a href="mailto:mikevdg@gmail.com">
mikevdg@gmail.com</a>&gt; wrote:<br>&gt;&gt; &gt; What do you mean by several packages defining names in the same<br>&gt;&gt; namespace?<br>&gt;&gt; &gt; Are you talking about method overrides? Then like I said before, I<br>
&gt;&gt; can&#39;t<br>&gt;&gt; &gt; work out how to do this without creating a security issue (I&#39;m<br>&gt;&gt; planning<br>&gt;&gt; on<br>&gt;&gt; &gt; Packages containing completely untrusted code which can be securely
<br>&gt;&gt; execute=<br>&gt;&gt; &gt; d locally).<br>&gt;&gt;<br>&gt;&gt; I am not talking about method overrides, no. I am simply talking about<br>&gt;&gt; package P1 defining a class X in N1 and package P2 defining class Y in
<br>&gt;&gt; N1. Nothing magical. :)<br>&gt;<br>&gt;<br>&gt; My implementation handles this fine. In this case, you&#39;d have P1<br>&gt; containing<br>&gt; N1::X (using Krampe notation) and P2 containing N1::Y. The import list of
<br>&gt; your code using X and Y would include P1 and P2 (import lists contain only<br>&gt; other Namespaces, and Packages are Namespaces).<br><br>If I understand you correctly (there are lots of assumptions here that I<br>
am not totally getting) - you are saying:<br><br>- Package IS a Namespace.<br>- Two packages CAN define names in the same namespace.<br><br>I may be daft but I don&#39;t get it. So P1 &quot;contains&quot; N1 and so does P2? And
<br>a package IS a Namespace? So N1 can appear in multiple places in your<br>hierarchy, is that what you mean?<br></blockquote></div><br>Well... kind of. I&#39;ll explain it in code:<br><br>Package is a subclass of Namespace; Namespace is a subclass of Dictionary.
<br><br>p1 := Package new.<br>n1 := Namespace new name: #Namespace1.<br>p1 at: #Namespace1 put: n1. &quot; should be p1 addNamespace: n1. &quot;<br>n1 at: #X put: X.<br><br>p2 := Package new.<br>n2 := Namespace new name: #Namespace1. 
<br>p1 at: #Namespace1 put: n2.<br>n2 at: #Y put: Y.<br><br>Now, if you add both p1 and p2 to your local import list, you can refer to Namespace1.X and Namespace1.Y.<br><br>Does this answer your question?<br><br>Regards,<br>
Gulik.<br>