A little namespace "proposal"

Roel Wuyts Roel.Wuyts at ulb.ac.be
Tue Apr 6 14:38:32 UTC 2004


Note: with Environments you are not messing with syntax (well, a bit - 
those ugly Capitals for selectors :-) ), but you are making a semantic 
change: namespace and class are conceptually unified. In other words, a 
class has (can have) three responsibilities: (1) keeping together 
related methods so that they can be reused, (2) instance creation, and 
(3) act somehow like a namespace.

So even though it looks like a regular message send, more is going on. 
Whether this is preferrable depends on the usage. If people use this 
system and most of the time create classes that take on these three 
roles at the same time in a meaningful way, it pays off (e.g. the 
previous definition of a class as having these three responsabilities 
holds). If, however,  some classes will take on roles (1) and (2), and 
some other ones will take on role 3, then I strongly believe you need a 
separate entity (a namespace) to have a clean system.

I believe that we are in the second case, and so I'd like to have a 
separate concept. But, this is my taste :-) And tastes may differ :-)


On 06 Apr 2004, at 15:38, Brent Pinkney wrote:

> Hi,
>
> Is there a reason why the current Environments prototype is not 
> preferred anymore ?
>
> I have always thought:
>
> 	 CoolSockets Socket open.
>
> is so much more in the flavour of object -> message = object than
>
> 	CoolSockets::Socket open.
>
> I like the fact that sending the class name to the namespace thing is 
> the same as sending a message to an instance of a class.
>
> Are we sure we want to abandon this tradition and start messing with 
> syntax ?
>
> Brent
>
>
Roel Wuyts                                                              
   DeComp
roel.wuyts at ulb.ac.be                               Université Libre de 
Bruxelles
http://homepages.ulb.ac.be/~rowuyts/                                    
Belgique
Board Member of the European Smalltalk User Group: www.esug.org




More information about the Squeak-dev mailing list