the monopoly of classes

jan ziak ziakjan at host.sk
Fri May 23 01:17:19 UTC 2003


On Thu, 22 May 2003 16:22:59 -0700 (PDT), Brian T Rice wrote
> 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.
> 

i have never seen an object without a "behavior". each object behaves in some 
way and thus has behavior, each object has its own logic of operation.

"If you want to be able to ask an object for its class, yes" (text in quotes 
copied from above): of course, but i have mentioned it in (1.) just above.

"If the object does not describe its own behavior, yes": i would say:
- if the object does not describe its own behavior, no
- if it does, the object contains a field pointing to the description of its 
behavior, so 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