Hi!
Giovanni Corriga giovanni@corriga.net wrote:
Il giorno gio, 30/11/2006 alle 12.07 +1300, Michael van der Gulik ha scritto:
On 11/29/06, Klaus D. Witzel klaus.witzel@cobss.com wrote:
Motivation for syntax: we say SmallInteger and LargeInteger to subclasses of Integer and obviously prefer the opposite direction for a namespace hierarchy. Let's replace the suggested :: by a legitimate binary message Morphic >~ View Tweak >~ View System >~ Default >~ Compiler My >~ Terrific >~ Compiler
Implementing Namespaces like this would mean that your code runs slower. In order to refer to a class, you'll need to send a message to a Namespace every time you refer to it, rather than just refer to the class directly.
Also, your message names are capitalised, which will have a negative affect on your karma.
Isn't this what Henryk's Environments do?
Henrik, not Henryk. And I would probably say Dan's/Henrik's Environments - Dan started that path and Henrik tried to fulfil it.
Personally I think it is too complicated - I dislike hierarchies in general :). But yes, the idea was to use late binding using message sends etc.
In fact, using my Namespaces you can do both I guess. We could implement a DNU on class Namespace and that would be it. They are already reified globals hanging in Smalltalk under their own name.
And right, I started on that Detailed walktrough I promised - but I only got through the "core" part and actually found an issue and also need to study some parts of it more to get it all nailed down. If you file that core part into say a 3.7 image the idea was that you could then create classes like Foo::Bar and use them (and thus be able to file in new code written with these namespaces). But the method #scopeVariable needs to be different for this to work - it expects to find an instance of Namespace called #Foo in Smalltalk - which of course will not be there.
But here is the current draft:
http://swiki.krampe.se/gohu/35
regards, Göran