the monopoly of classes

Brian T Rice water at tunes.org
Thu May 22 23:22:59 UTC 2003


On Fri, 23 May 2003, jan ziak wrote:

> On Thu, 22 May 2003 14:29:13 -0700 (PDT), Brian T Rice wrote
> > On Thu, 22 May 2003, jan ziak wrote:
> >
> > > in smalltalk:
> > > 1. object must be an instance of a class
> > > 2. class is an object
> >
> > Let me restate it:
> >
> > 1. Every object must be an instance of a class. Classes describe
> > their instances.
> > 2. Classes themselves are objects, therefore they also have their
> > own classes in Smalltalk.
> >
>
> more precissely:
> 1. every object includes a field which contains a reference to its "class
> object"
> 2. object Class includes a reference to its "class object" also
>
> my question is: do all objects really need to contain that field ?

If you want to be able to ask an object for its class, yes. If the object
does not describe its own behavior, yes.

Would you mind asking a book and yourself this question instead of us?
We're relatively happy with this system, and don't really need to explain
ourselves to you a dozen times over.

-- 
Brian T. Rice
LOGOS Research and Development
http://tunes.org/~water/



More information about the Squeak-dev mailing list