stason.org logo lotus


previous page: 2.3) What Is Dynamic Binding? (Typing - Object-Oriented Technology)page up: Object-Oriented Technology FAQnext page: 2.5) What Is The Difference Between Static And Dynamic Typing? (Typing - Object-Oriented Technology)

2.4) Is There A Difference Between Being A Member Or Instance Of A Class? (Typing - Object-Oriented Technology)

 Books
 TULARC
















Description

This article is from the Object-Oriented Technology FAQ, by Bob Hathaway rjh@geodesic.com with numerous contributions by others.

2.4) Is There A Difference Between Being A Member Or Instance Of A Class? (Typing - Object-Oriented Technology)

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++.

 

Continue to:


Share and Enjoy

Bookmark this story so others can enjoy it:
  • digg
  • Reddit
  • del.icio.us
  • Furl
  • Wists

Tags

programming, software, coding, Object-Oriented, language, dynamic binding, constructor, destructor, overriding, methods, inheritance, reflection, persistence, MFC, real-time, polymorphism, system, database, vendor







TOP
previous page: 2.3) What Is Dynamic Binding? (Typing - Object-Oriented Technology)page up: Object-Oriented Technology FAQnext page: 2.5) What Is The Difference Between Static And Dynamic Typing? (Typing - Object-Oriented Technology)