the monopoly of classes

Cees de Groot cg at cdegroot.com
Fri May 23 07:08:10 UTC 2003


On Fri, 2003-05-23 at 03:23, jan ziak wrote:
> yes, but in class-ified object oriented systems (like smalltalk) the 
> procedure you just described cannot be performed, because it is not "first 
> make some objects and if obvious then make a common class object" but it 
> is "make a common class object in any case".
> 
That's called 'efficiency'. As Andreas said, the reason to make it so is
performance; I say the reason to make it the default is in order to
prevent everyone from reinventing the wheel.

That said, it's just the default. Please stop bouncing the same question
over and over again, and see what you can do in Smalltalk by subclassing
'nil', making your own metaclasses, or try to make objects that describe
their own behavior. I've never tried it, because I think it's a futile
experiment, but I think Smalltalk should make even the latter possible.

The fact that it is (probably) possible and the fact that the only two
classless OO languages I know (Self and ECMAscript) aren't exactly huge
successes should indicate that maybe there is something to this whole
class businesss.

Let me try an analogy: in the real world, all physical objects share in
essence a common superclass, namely the class that would describe the
behavior of physical objects in terms of the various laws of physics. In
essence, Object/Class/Metaclass lay down the laws of physics for a
Smalltalk environment - because it's a virtual world, we're free to
define these laws, which is cool. To some extent - and I urge you to
probe the boundaries here, you might be surprised - we can even change
them, which is even cooler but unsettling to some ;-). 

If you don't like the current laws of physics in Squeak, you should not
whine about it on the list. Rather, you should modify Squeak to suit
your needs (it's all there for you to play with), and *show* us that
'your' way is 'better'. Or, of course, start doing your development work
in ECMAscript...

(the second analogy up my sleeve about Object is that you share a lot of
behavior with all other objects of the class 'living thing', encoded in
your DNA. AFAIK, you can extract a surprisingly large core of common
code shared by all living things, but certainly shared by all living
things of the class 'mammal'. Now, that mother nature replicates your
code physically throughout your body and *exactly the same code*
throughout the bodies of countless other living things just indicates to
me that biological systems are hugely inefficient at times, and bless
yourself lucky that you possess the power to abstract and move this
duplication away into some meta-level objects).








More information about the Squeak-dev mailing list