Why do I have 6 instances of the "Object" class in my 3.8 image?

Alejandro F. Reimondo aleReimondo at smalltalking.net
Fri Jul 22 06:30:24 UTC 2005


Hi Darius,

Object class, as any object can receive any message (e.g. #new ).
If you send #new message to Object class, it will return an instance,
 as usual with other classes (if they want to :).
There is no "abstract" classes in Smalltalk. All objects are simply objects.
Class objects are not really "classes" but species, because they coevolve in
the ambience.
Please consider Smalltalk as an Ambience (an open system) with concrete
objects,
 some of them has a role in systems evolution (it is modeled) like "classes"
(species model).
Smalltalk's Classes (species) are NOT classes as in formal specification of
programs because they are compromised with systems evolution (there is no
compromise with evolution in formal definition of closed systems, like used
when developing software with programming languages in a declarative way).

But... when it is requiered to use an instance of Object?
There are some rare circumstances where you need an object whre you know it
is different of any other object (including nil :-)
In this cases instantiating a new object is a valid solution.

For example, when we need to consume an stream upTo the last object, we can
write:
  aStream upTo: Object new.

best,
Ale.





----- Original Message ----- 
From: "Darius" <squeakuser at inglang.com>
To: <squeak-dev at lists.squeakfoundation.org>
Sent: Friday, July 22, 2005 4:23 AM
Subject: Why do I have 6 instances of the "Object" class in my 3.8 image?


> Just curious.
>
> I seems to go against the principles of Smalltalk.
>
> Cheers,
> Darius
>




More information about the Squeak-dev mailing list