Chapter 5
- Object-oriented languages
generally offer a facility for
creating objects,
the capability of message passing,
classes and inheritance.
See slide
[5-classification].
- A classification of object-oriented
languages may distinguish between
hybrid languages, frame-based
languages as employed in Artificial
Intelligence,
parallel/distributed languages
and languages supporting prototypes.
See slide
[5-classification].
- Characteristic for the object model supported
by C++ is the unification of classes
with the struct
record type.
See slide
[5-structure].
- Object-based implies support for
encapsulation,
whereas object-oriented implies
support for encapsulation and inheritance.
See slide
[5-object-based].
- As orthogonal dimensions along
which to describe the design of
object-oriented languages you may
distinguish between objects, types,
delegation and abstraction.
See slide
[5-orthogonal].
- Prototype-based languages support an object
model based on exemplars.
Their most characteristic feature
is support for dynamic delegation.
- Inheritance is static;
it amounts to creation-time sharing,
whereas delegation supports lifetime
sharing.
See slide
[5-prototypes].
- The C++ language supports the forwarding
of member function calls.
Forwarding does not, however, allow
for binding self-reference to the forwarding
object.
- In classical object-oriented languages,
the notion of class stands for
object generator and interface description.
A class may further be a repository
for sharing resources
and act as an object capable of
answering (class) methods.
See slide
[5-class].
- The first three postulates
given in slide
[5-postulates]
pertain to Smalltalk.
With some minor modifications,
these postulates hold for other
classical languages.
The fourth postulate of slide [5-postulates]
specifies the constraint that must be met
by a reflective architecture:
class variables of an object must be
instance variables of the class of
the object (when considering the
class as an object).