<a href="http://gulik.pbwiki.com/Namespaces">http://gulik.pbwiki.com/Namespaces</a><br><br>There is code available on the 3.10 Package Universes that I&#39;m currently using to varying degrees of success.<br><br>Gulik.<br>
<br><div class="gmail_quote">On Jan 23, 2008 6:36 AM, Jason Johnson &lt;<a href="mailto:jason.johnson.081@gmail.com">jason.johnson.081@gmail.com</a>&gt; wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
So no one knows of a system like this? &nbsp;There&#39;s nothing new in our<br>field since decades so I&#39;m sure there are papers or an implementation<br>out there, I just haven&#39;t found it yet.<br><br>On Jan 20, 2008 5:30 PM, Jason Johnson &lt;
<a href="mailto:jason.johnson.081@gmail.com">jason.johnson.081@gmail.com</a>&gt; wrote:<br>&gt; Hi all,<br>&gt;<br>&gt; Recently working in other high level languages I was thinking about<br>&gt; how modularity is accomplished in these systems and how we might do it
<br>&gt; in Squeak.<br>&gt;<br>&gt; Now we could of course simply add something trivial that formalizes<br>&gt; the prefixes we are using now and hide them for us (sometimes), but<br>&gt; this doesn&#39;t really help our position much or make us much better at
<br>&gt; &quot;programming in the large&quot;.<br>&gt;<br>&gt; Looking at other systems, Haskell, Ocaml and Lisp, it is interesting<br>&gt; how they tackle this problem. &nbsp;What these systems all have in common<br>&gt; is a pretty simple idea: a module declaration defines what is
<br>&gt; &quot;exported&quot; or visible from outside the module (or at least can be made<br>&gt; so) and everything else is only visible to code inside the module.<br>&gt;<br>&gt; So combining this simple concept with Smalltalk&#39;s unique &quot;objects all
<br>&gt; the way down&quot; philosophy it occurred to me that a module could appear<br>&gt; as simply a class like any other. &nbsp;The typical &quot;import&quot; mechanisms<br>&gt; could be ignored, and export is handled as it is now. &nbsp;That is, today
<br>&gt; all classes and objects &quot;export&quot; methods; they simply respond to the<br>&gt; ones they implement and DNU the ones they don&#39;t. &nbsp;Today, in Squeak all<br>&gt; classes are inserted into a global namespace and are therefor visible
<br>&gt; from anywhere. &nbsp;With this module system I&#39;m talking about, it would<br>&gt; still work this way, but when one creates a new module, only the<br>&gt; &quot;module class&quot; would be inserted. &nbsp;Any classes inside the module would
<br>&gt; not be inserted into the global namespace and would therefor not be<br>&gt; visible globally.<br>&gt;<br>&gt; The &quot;module class&quot; could chose to behave completely as a normal class,<br>&gt; i.e. the messages it exports/answers do their work by using the
<br>&gt; module&#39;s internal classes and objects, as well as global classes and<br>&gt; other modules. &nbsp;An example of this might be a Seaside application<br>&gt; which simply/responds to #renderOn: but internally has a complex
<br>&gt; series of class/objects determine the behavior. &nbsp;From the point of<br>&gt; view of Seaside there is just one class that receives the render<br>&gt; request. &nbsp;This is actually what we have right now, but the difference
<br>&gt; is that today every class even remotely involved in the application is<br>&gt; visible everywhere, despite being essentially &quot;private&quot; to the<br>&gt; application.<br>&gt;<br>&gt; The &quot;module class&quot; could also chose to behave as a &quot;namespace&quot;, simply
<br>&gt; restricting access to its internal classes. &nbsp;But the most common<br>&gt; behavior would likely be a hybrid between these two possibilities.<br>&gt; That is, often you would send a message to this visible &quot;module class&quot;
<br>&gt; and it would behave as though it were a normal class. &nbsp;Other times you<br>&gt; might send a message and the return value would be an instance of one<br>&gt; of the modules internal classes (think, a regular instance creation
<br>&gt; method like Point&gt;&gt;x:y: that just happens to return an initialized<br>&gt; instance from a class inside the module).<br>&gt;<br>&gt; Now, the question of course comes up of how such a system would look,<br>
&gt; be implemented, etc., etc. and I haven&#39;t really thought about that<br>&gt; part yet. &nbsp;I&#39;m sure I&#39;m not the first person to think of such a<br>&gt; system, so my question is: what systems do you all know about that
<br>&gt; sound like what I have described?<br>&gt;<br>&gt; Thanks,<br>&gt; Jason<br>&gt;<br><br></blockquote></div><br><br clear="all"><br>-- <br><a href="http://people.squeakfoundation.org/person/mikevdg">http://people.squeakfoundation.org/person/mikevdg
</a><br><a href="http://gulik.pbwiki.com/">http://gulik.pbwiki.com/</a>