A little namespace "proposal"

Lex Spoon lex at cc.gatech.edu
Sat Apr 17 19:32:06 UTC 2004


Ah.  I see, Goran, that I misunderstood the baseline proposal.  The last
sentense of this clause is important:

> There is no explicit "creation step" for a namespace (or removal) -
> they are simply created and removed "on demand" or whatever. This means
> we all can "carry on just like before". :) Or in other words, it is an
> attribute of the class.

Also, you give this code example:

	Object subclass: #NameOfSubclass
		instanceVariableNames: ''
		classVariableNames: ''
		poolDictionaries: ''
		category: 'Kernel-Processes'
		namespace: 'Kernel'
		

I must admit that I still do not understand the proposal entirely.  I
guess I can wait until your implementation is shaped up.

As one small comment, if the only purpose of namespaces is to provide
short names, then it seems like namespaces should be maps of names to
names, not of names to bindings.  So they should be different from our
venerable Smalltalk dictionary.  But maybe I misunderstand the point.

One thing that bothers me is the idea that a class will only be
interested in a single namespace.  If I write some code, it seems that I
may very well want to import from both Tweak and from
RegularExpressions.  Why should I have to pick which short names my code
will be allowed to use?

Also, I still do not see exactly how Alice will get short Tweak names in
the example scenario I posted.  While she will have Andreas's class
definition that says namespace: 'Tweak', how does she receive a useful
Tweak namespace to begin with?  That is the issue I am worried about. 
The namespaces need to travel along with the code that uses them.

Ah well.  Overall, I am glad to see that people are considering end user
aspects so thouroghly in this discussion, even if I am confused about
the specifics that are being bantered about.

Lex



More information about the Squeak-dev mailing list