On Sep 18, 2007, at 15:58 , Brent Pinkney wrote:
+10000 for:
self add: (Kernel Array new: 4).
This mechanism preseves the elegant foundation of Smalltalk: 'Everyting is an Object, which receives a messages and returns an object'. In this (Dan's ?) solution, the implementation is late bound and can use the same lookup algorithm as used for messages.
This is indeed elegant - however, it "hides" the classes from tools, like, if you want to find references to "Kernel Array".
The other solutions lack this elegance.
Well, in Göran's version there simply is a global named #Kernel::Array which I find quite elegant too (if you like TSTTCPW). It's even hardly a "namespace" so much as it is a formalization of prefixes.
- Bert -