Squeak and Namespaces

Klaus D. Witzel klaus.witzel at cobss.com
Thu Nov 30 02:01:40 UTC 2006

Hi Michael,

on Thu, 30 Nov 2006 00:07:24 +0100, you wrote:
> On 11/29/06, Klaus D. Witzel <klaus.witzel at 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.

Why should it? There are 2 possibilities:

1 - the compiler does not know about #>~ and so compiles a message send  
which results in DNU.

2 - it does know, then is compiles the usual reference to a literal  
variable (name being resolved at compile-time: that's the magic behind  

> 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.

By no means, only the compiler has, not me :|

> Also, your message names are capitalised,

The word after the >~ is not a message name, it's in argument position  
(like in the Smalltalk programming lanugage ;-) And the word before the >~  
is in argument position, too :) That's the nature of the binary #>~  
message (handled by compiler).

> which will have a negative affect on your karma.

Not my karma: the compiler's karma ;-)


> Michael.

More information about the Squeak-dev mailing list