Quick comparison of two Namespaces proposals

nicolas cellier ncellier at ifrance.com
Wed Sep 19 20:23:58 UTC 2007


more over, could be a syntax rule:

capitalized message: answer (self namespace at: message)
non-capitalized: traditional message send.

we could as well write (self Array new: 4)


Tansel a écrit :
>  
>  >  Array is a class, not a message. This is /not/ elegant and simply 
> doesn't make sense. This is my last comment on this approach. 
>  
> That's not strictly correct. In the given example it is a message: you 
> are simply asking the given namespace to answer the named class, and the 
> only confusing thing about it is the message is capitalized.  What if it 
> were written as "Kernel array new:4"?  
> It is already possible to create a capitalized message in Squeak, we 
> just avoid it because it gets confusing. However in the given context I 
> simply applaud Dan's genius and I second that it is a simple and elegant 
> solution. For the more conservative approach I would have no problem 
> with a namespace creating a non-capitalized accessor message for the 
> given class but that could cause other confusions.   
>  
> Tansel 
> 
>  >  +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 .  
>  >  The other solutions lack this elegance.
> 
> 
> ------------------------------------------------------------------------
> 
> 





More information about the Squeak-dev mailing list