A little namespace "proposal"

goran.krampe at bluefish.se goran.krampe at bluefish.se
Sun Apr 11 09:22:32 UTC 2004


Hi Peter and all!

"Peter van Rooijen" <peter at vanrooijen.com> wrote:
> I'm a little bemused by the whole discussion.

:)

> Smalltalk already has
> namespaces. Classes, with their class variables, are namespaces for their
> hierarchy (one binding per name per hierarchy). Pools are namespaces which
> are importable at will (one binding per name per pool per class).

Yes. But we are talking of larger spaces than the class itself and pools
are currently not used much in Smalltalk, especially not to hold groups
of classes.

I do agree though that the "import list per class as in Java"-model Lex
is arguing for is IMHO more or less identical to how pools work today.
But I personally definitely don't want to use that model for managing
groups of classes in different spaces.
 
> Clearly, the system could be extended. Fully qualified names might be
> allowed (Pool::Variable syntax is already supported in IBM Smalltalk).

That is interesting.

> Redefinition (re-binding) of class variables for a sub-hierarchy might be
> allowed. Pool imports for a method might be allowed. Inherited pools might
> be added. Namespaces might be allowed to (selectively) inherit other
> namespaces.

All of these things you mention seems unnecessary to me and would just
make Squeak more complicated. I hate complexity.

> But I wonder if these extensions are even required to address the current
> namespace-related issues/problems being discussed.

Oh, good. :)
 
> What am I missing?
> 
> Peter

Well, AFAICT you are saying "Hey, can't we just use pools to manage
groups of classes?" and at least I don't think it is a good idea. Lex
might. :)

regards, Göran



More information about the Squeak-dev mailing list