Squeak and Namespaces

J J azreal1977 at hotmail.com
Fri Dec 1 06:28:01 UTC 2006




>From: Göran Krampe <goran at krampe.se>
>Reply-To: goran at krampe.se, The general-purpose Squeak developers 
>list<squeak-dev at lists.squeakfoundation.org>
>To: "The general-purpose Squeak developers 
>list"<squeak-dev at lists.squeakfoundation.org>
>Subject: Re: Squeak and Namespaces
>Date: Thu, 30 Nov 2006 09:45:56 +0100 (CET)
>
>Hi!
>
>Yes, and let me here note that in my solution ALL references to globals
>are JUST LIKE TODAY. That means that they are ALWAYS fully qualified in
>the SOURCE. Sorry for the caps, but this is VERY important to realize.
>

I think I understand your solution pretty well.  Unless I am missing 
something it is pretty simple:  You allow :: in the class name.  If it's 
there it is used.  If the Class at the end (e.g. NS::OtherNS::Class) is 
unique on it's own in the system then that is all that shows up in your 
source.  If not, then every place that is ambiguous gets explicitly written 
out by the compiler.  Right?

I appreciate all that you have went through to do something about this, and 
I'm sure you have fought this battle many times.

But here is what I see personally:
- The way it works today seems good enough.  I know we are all prefixing our 
stuff, but that doesn't seem that bad.  Maybe it's because I have only done 
smaller projects so far so I am not strong on this point, I will take the 
word of more experienced people (yourself included, but I'm not sure all the 
votes are in yet).
- Suppose we use your system for the default.  At first there are no classes 
that use it, and everything is still nice and pretty.  Then one day I 
download some project that uses your namespaces a lot, and it happens to 
define Array.  Now my entire image has "Kernel::Array" everywhere, right?

>I don't think addon namespace solutions will ever be used. I wouldn't.
>

I think you mis-understand me here.  I don't see the namespace problem as 
pressing honestly.  Maybe I don't appreciate the pain this is causing 
because I generally prefix my classes anyway.  But in a *business* you can't 
wait for the perfect solution.  You have a dead-line that must be met.  So 
having a drop in solution, even if it is a quick fix, is a necessity.  So 
no, you wouldn't use an addon for personal things.  Neither would I.  But 
for my company?  I have and will continue to.  There just isn't time not to.

>Hehe, rush? Are you aware of when I wrote this? Are you aware of how many
>posts I have written about it? Are you aware of how awfully many times the
>question of Namespaces have come up on the list? It is one of the "deadly
>subjects" always causing an explosion of subjective views and always end
>in nada.
>

No, I am not aware of all the history here.  But none the less, this is a 
big issue as it changes the way Squeak smalltalk looks.

> >   The problem with that is that there has to be a way for those classes 
>to
> > explicitly reference classes in other packages, and anything not in that
> > package must always explicitly reference which class they mean.  There 
>is
> > also the problem that some implicit magic happens with conflict
> > resolution.
> > So this idea would also introduce new syntax (and thus I wouldn't go for
> > it
> > either).
>
>Not sure what you mean.
>

I was just discussing the problems with my first cut implementation.

_________________________________________________________________
Fixing up the home? Live Search can help 
http://imagine-windowslive.com/search/kits/default.aspx?kit=improve&locale=en-US&source=hmemailtaglinenov06&FORM=WLMTAG




More information about the Squeak-dev mailing list