A little namespace "proposal"

Martin Wirblat sql.mawi at t-link.de
Tue Apr 6 13:13:02 UTC 2004


Hi Göran,

>> Namespaces may lower the signal to noise ratio of our source code.
>
>Again - though I assume you read it - note how the "rendering" 
>mechanism I described will always render references in their "minimal 
>form". If the image only contains unique class names (or other named 
>objects) then all references will be unqualified when you read the 
>source. 

The main reason why the signal to noise ratio drops, is that people 
will refrain from giving things more descriptive names. That the 
source code may or may not get cluttered with meaningless information 
( the namespace info ) is secondary. So we are losing the signal 
independently of the noise becoming louder. 

>> Given how fast people here are starting to talk about nested 
>> namespaces or "partitioning" the whole image into many namespaces, 
>> I guess implementing namespaces will not automagically "clean up" 
>> names in the future, it will probably do the opposite. 
>
>My proposal was a flat list of Namespaces. No nesting. And how many
>Namespaces we would use for our standard packages is also up for
>discussion.
 
Yes, but I just wanted to repeat your warnings about what will "crash 
down the hill on us". Your idea of having many small namespaces in the 
Full image showed me, how fast one can become intrigued by the 
"coolness" of namespaces. ( Starting out critical and then becoming 
converted without recognizing it. Well, not really ;-) 

My gut feeling was and is that the official Full image should be only 
one single namespace. Of course the question then arises, what the 
goal of such namespaces is. And surely this will have some drawbacks, 
but it will ensure best that people try to name meaningful. Perhaps it 
will even invite to merge similar classes. As you said, namespaces 
lure people into reinventing the wheel all the time. 

>Anyway, now my posting sounds like a "defense" but I am not sure you
>really were critical at all. :) :)

No, I just hooked into your post at what I consider to be the culprit 
of namespaces. Your proposal seems to take care of this special 
problem, but I think the question is still: Are the advantages greater 
than the problems? 

Special note: I would drop "shy". It complicates things ( bitten by 
the hidden ) and is a step in the wrong direction, it allows the lazy 
programmer to circumvent the search for a proper name. 

regards
Martin





More information about the Squeak-dev mailing list