multiple classes with the same name

Ralph Johnson johnson at
Thu May 25 10:41:28 UTC 2006

On 5/25/06, Craig Latta <craig at> wrote:

>         The only compilation that need occur is when authors accept methods
> after editing. The browser can easily detect when an author attempts to
> compile some source which invokes a name used by multiple classes, and
> prompt for disambiguation. The system could, for example, provide a list
> of the class categories in which the "Person" classes appear.
>         In effect, each class in the system has its own namespace, since all
> class names are completely unconstrained all the time in all locations
> (i.e., "universally", which really just recapitulates the "universal" in
> "UUID" :). It will still be useful to put classes into named groups, for
> the purposes of organizing them, but I don't consider such groups to be
> namespaces. For one thing, within any such group you can have any number
> of classes with the same name. You could give every class in the system
> the same name if you really wanted to. :)

There is a lot of Smalltalk code that says (Smalltalk at: className)
and expects to get a class.  This is more than just a matter of tools,
it is part of the reflective definition of Smalltalk.  Does Spoon get
rid of the global variable Smalltalk?  What about other global

One solution is to delete the global variable Smalltalk from the
system, but then a lot of code won't work.  A better solution would be
to figure out a simple name-space management system so that most uses
of the global variable Smalltalk will continue to work.

-Ralph Johnson

More information about the Squeak-dev mailing list