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.
Friends may be classes or functions.
They are allowed access to the private parts
of an object.
They may be necessary for reasons of efficiency.
Friends are a relatively safe feature,
since they must explicitly be declared
by the class itself.
They are not inherited.
Neither is it possible for a class or
function to declare itself as a friend
of a class.
Nevertheless, friends may jeopardize
the integrity of an object.
Treat friends with care.
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.
Active objects are, basically, objects with threads.
Synchronous active objects, as supported by sC++,
support method call by rendez-vous, protecting
the object from unsafe access.
Active objects may be used instead of event-loops
and callbacks, thus avoiding the need to merge
multiple event-loops.
See section Active.
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.
Both C++ and Java support 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).