Newsgroups: comp.lang.smalltalk
Path: cantaloupe.srv.cs.cmu.edu!europa.chnt.gtegsc.com!news.sprintlink.net!mv!usenet
From: rapp@lmr.mv.com (L. M. Rappaport)
Subject: Re: Smalltalk terminology - Object, Class, and Instance
Message-ID: <DAwJ46.94J@mv.mv.com>
Nntp-Posting-Host: lmr.mv.com
Sender: usenet@mv.mv.com (System Administrator)
Organization: MV Communications, Inc.
Date: Thu, 29 Jun 1995 00:17:04 GMT
References: <3shvfp$l9k@portal.gmu.edu> <DAsuBL.9Ir@mv.mv.com> <3sp5eg$kos@access5.digex.net>
X-Newsreader: Forte Free Agent 1.0.81
Lines: 56

bpetros@access5.digex.net (Barry Petros) wrote:

... edited

>>An object is an instance of a class.  The word "instance" may also be
>>substituted for the word "object"

>This is the second time that you have made this statement.  I do not agree
>that it is *entirely* accurate.  I would like to restate as follows. Every 
>object in smalltalk has a class, thus every object must be an instance of
>some class object.  Therefore, every object is an object and every object is
>an instance.  This may lead you to believe that the term object and
>instance are interchangeable.  However, in *our* language words often carry
>connotations beyond their simple meanings.  The term instance (to me) carries
>the connotations of talking about the relationship between a class and its
>instance(s).  The term object is somewhat more generic.

The fellow asking the question seemed to me to be a beginner, so I
once again repeat that he is better off simply considering an "object"
and an "instance" to be one and the same.  A class which is an
instance of a metaclass is then both a class and an object, (depending
upon your perspective)  but to speak of them in those terms is very
confusing to a beginner, don't you think?  And a metaclass is both an
object and a class, by definition to avoid recursion.  Further
confusion best left to others further along!

>I have taught quite a few introductory classes in smalltalk.  In these classes,
>I have found that it is useful to distinguish between instance objects
>and class objects.  This helps with the distinction between instance methods
>and class methods.  Now all the guru smalltalkers on this newgroup will
>catch me in my lie.  My implication is that instance objects form a disjoint
>subset as compared to class objects. In reality, this is not true!  Every
>class object is also an instance object.  This is a corollary of 'Every
>object has a class'.  Since I do not like to be called a liar, I go one
>step further.  I like to distinguish class objects from instance objects
>objects by stating: 'A class object is one that (has a behavior which) can
>create instances.  An instance object can *not* create other instances, at
>least not without *contracting* the help of class object.'

Don't you think you are going too far to explain class ivars and
methods?  To me they are simply ivars and methods which may be
accessed by and be visible to all instances of a class.  Am I off here
(new to Digitalk, not new to OO)?

> Some
>OOA/D people and smalltalk vendors will also talk about a third type
>(cares-about) which is simulated (in VW) with the class library.

I'm not at all familiar with "cares-about".  What are its
characteristics?

Thanks,

Larry
--

