the monopoly of classes

Andreas Raab andreas.raab at gmx.de
Thu May 22 22:42:37 UTC 2003


Hi Aaron,

> > hi again. i want to ask why must everything in squeak be a 
> > subclass of something. do you think it's rational?
> 
> What logic would there be in doing it any other way?
> 
> In a comprehensively OO system like Squeak, it makes a lot of sense to
> have a root class that is the ultimate superclass of everything else.

There is a different way of looking at "class Object" which I actually
prefer. It's to say that "class Object" provides the behavioral environment
in which all the other objects exist. That's similar to SystemDictionary
which provides the "object environment" (globally accessible objects - in
class Object you have globally accessible methods) without which, most other
classes wouldn't be able to function. In this sense, anything that's within
class Object is really a "global function". And here, it can make sense to
say that "class Object" really shouldn't be visible to users (programmers)
in that context because "subclassing" it really means to declare the object
to be part of some common environment.

BTW, I am very seriously considering doing exactly that - get rid of the
"visibility" of class object in favour of a global context. That this could
be implemented by setting the superclass pointer of a "root class" to the
environment object in order to make the lookup of the "global functions"
more efficient is a completely different issue.

Cheers,
  - Andreas



More information about the Squeak-dev mailing list