Hi all.<br><br>Now by this stage you&#39;re probably all thoroughly sick of namespaces.<br><br>I&#39;ve put together a more complex namespaces architecture. It&#39;s now available on the PackageUniverses for 3.10. Note that this release is still very buggy and for curious developers only.
<br><br>To install: Go to Tools/NamespaceBrowser and install that.<br><br>Then browse to PasteUpMorph&gt;&gt;isSafeToServe, modify and save the source there. (I noticed this bug just now).<br><br>Then evaluate: &quot;NamespaceExamples openPackageManager.&quot;
<br><br>This converts existing code in the image and eventually pops up a PackageManager with four packages: Kernel, Collections, Morphic and Legacy (which contains the SystemDictionary). Right-click on these and click &quot;Browse&quot; and play around some. Then close Squeak, chuck the image away and wait for the next announcement :-). Currently there&#39;s a NamespaceBrowser, NamespaceWorkspace, and a package management tool where all the action starts from.
<br><br>Some documentation for my approach is at <a href="http://gulik.pbwiki.com/Namespaces">http://gulik.pbwiki.com/Namespaces</a>.<br><br>Some advantages of this approach:<br><br>- It doesn&#39;t need the SystemDictionary, but will work happily alongside it. It makes a couple of changes to the compiler etc, but these should not affect the workings of the rest of Squeak. Classes in namespaces are not stored in the SystemDictionary but are stored in packages (which again aren&#39;t stored in the SystemDictionary either).
<br><br>- You can load two (or more) versions of the same package into the same image at the same time and make objects from either. Loading a package does not modify any other classes currently in the image.<br><br>- Packages depends on other packages by UUID, and if you modify a package it gets a new UUID. This means that your code will never suffer from dependency problems and will always run in exactly the same environment you wrote and tested it in. Bit-rot shouldn&#39;t happen unless you start changing the VM.
<br><br>- You don&#39;t need to use haltOnce: any more. The system can run the code in a read-only package (not yet supported...) and you can do your work on a working copy of that package.<br><br>- Naming collisions are impossible (or at least they should be... not yet tested).
<br><br>- It doesn&#39;t need to be integrated into the official image because it can be loaded as a Monticello package. I plan to work out a way to make .mcz or .st files that use namespaces automatically load namespace support into the image.
<br><br>- It&#39;s probably compatible with Göran&#39;s approach :-). You can have two namespace implementations in your image at the same time... if you really want to.<br><br>Gulik.<br><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>