multiple classes with the same name, namespaces

Ralph Johnson johnson at
Sat May 27 10:45:41 UTC 2006

On 5/27/06, Craig Latta <craig at> wrote:
> .When we
> encounter an occurrence of "Smalltalk at:", we can find all the classes
> in the system which have the given name. We don't have to use
>  >>allSubclasses since we'll have a cache of all classes in the system
> (recall my proposed replacement for the current system dictionary).

I don't understand your replacement for the current system dictionary.
 It is just an unkeyed collection of classes.  Why bother, when you
can already ask Class for its instances, or Object for its subclasses?
 Why duplicate functionality?

I can see how to make a UI for asking someone to disambiguate a name;
that is not a problem for me.

The performance of sequencially searching for a class is also not a
problem for me.  It is not a problem in the browser, since few methods
will refer to more than a handful of classes.  If you are filing in a
lot of code, the system could make a dictionary from names to classes
and reuse it during the fileIn.

>         Yes, because class names are dynamic. I don't think the time hit is a
> big deal, either. I assume you do?

Class names are not dynamic if you want source code to work.  If you
change the name of a class then you have to find code that refers to
the class and patch it.  If you only care about compiled code, and not
source code, then class names are dynamic.


More information about the Squeak-dev mailing list