Newsgroups: comp.lang.smalltalk
Path: cantaloupe.srv.cs.cmu.edu!europa.chnt.gtegsc.com!howland.reston.ans.net!xlink.net!rz.uni-karlsruhe.de!nntp.gmd.de!news.rwth-aachen.de!news.rhrz.uni-bonn.de!rhein!oink.rhein.de!bnc.net!ins.net!heeg.de!gustav!hmm
From: hmm@gustav (Hans-Martin Mosner)
Subject: Re: Smalltalk terminology - Object, Class, and Instance
Message-ID: <DAtMy8.nr@heeg.de>
Sender: uucp@heeg.de
Organization: Georg Heeg Objektorientierte Systeme, Dortmund, FRG
X-Newsreader: TIN [version 1.2 PL2]
References: <3shvfp$l9k@portal.gmu.edu>
Date: Tue, 27 Jun 1995 07:46:55 GMT
Lines: 35

The definitions that you cite are in fact a bit confusing. Let me try
to clarify things:

1. In Smalltalk, everything is an object. There is no artificial
   division between "simple data" such as Integers, Characters etc.
   and "full objects".
2. Every object has a class that describes its structure and behavior.
   The object is said to be an instance of its class.
   For example, the object 3 is an instance of the class SmallInteger,
   while the object 'abc' is an instance of the class String.
3. From 1. follows that classes, too, are objects. The class of a class
   is generally called a metaclass.
4. Of course, metaclasses have classes as well. Fortunately, all the
   metaclasses are instances of the same class called Metaclass.
5. Every class has a superclass, which may be another class or nil
   (the undefined object). The behavior of instances of a class is
   determined by the class and its superclasses such that when some
   method is not defined in an object's class, it is being looked
   up in the superclass chain.

The classic book "Smalltalk-80, The Language" by Adele Goldberg and
David Robson has diagrams which helped me to understand the concepts
firmly. I have tried to transform the diagrams into ASCII art, but
that's rather difficult.
Try to get book for an understanding of the language. Although the
system as it is described in the book is outdated, the language
description is still up-to-date and very readable.

Hans-Martin

--
+--- Hans-Martin Mosner -------- Senior Smalltalk Guru ---+
| These opinions are entirely ficticious.  Any similarity |
| to real opinions is purely coincidental and unintended. |
+--- <hmm@heeg.de> ------ URL:http://www.heeg.de/~hmm/ ---+
