Object-Orientation FAQ

2.4) Is There A Difference Between Being A Member Or Instance Of A Class?

Yes (but be careful of context).  To use C++ terminology, an object (not
a reference) is defined to be an instance of exactly one class (in classical
OO), called its most derived class.  An object not directly contained in any
other is called the complete object [Stroustrup 90].  An object is a member
of several classes, including all of the classes its declared (or most derived)
class inherits from.  With static typing and inclusion polymorphism based on
class, if a polymorphic object (or reference) is made to refer to an object,
that object must be a member of the polymorphic object's class.
This also provides a good example of differing definitions among object-
oriented languages, since a member is defined as above in CLOS, but a member of
a class is one of its instance variables in C++.

This document was translated by ms2html v1.8 on 01.06.95.