Objects -- language characteristics
- object creation facility
- message-passing capability
- class capability
- inheritance features
Classification
- hybrid -- C, Lisp, Pascal, Prolog
- frame-based -- knowledge-based reasoning
- distributed, concurrent, actor -- parallel computing
- alternative object models -- prototypes, delegation
slide: A classification of languages
Actually, as we will see in section [dimensions], one may have
a lively debate on the proper design dimensions of object-oriented
programming languages.
An important issue in this respect is what makes a language
object-oriented as opposed to object-based.
Other issues in this debate are whether an object-oriented language
must support classes (in addition to a mechanism to create objects)
and whether (static) inheritance should be preferred above (dynamic) delegation.
This debate is reflected in a number of research efforts investigating
alternative object models and object communication mechanisms.
See section [prototypes].
Of the 69 (standalone) object-oriented languages surveyed,
53 were research projects and only 16 were commercial products.
Of these, 14 were extensions of either Lisp (10)
or C (4).
Among the remaining languages, quite a number were derived from
languages
such as Pascal, Ada or Prolog.
There is a great diversity between the different object-oriented languages.
However, following [Sau89], they may be divided among subcategories reflecting
their origin or the area of application
for which they were developed (as shown above).
Hybrid languages
These, having originated out of (an object-oriented
extension of) an already existing language, are likely to be applied
in a similar area to their ancestor.
In practice, this category of languages (which includes C++ and CLOS) seems
to be quite important, partly because their implementation support is
as good as the implementation support for their base languages
and, more importantly, they allow potential software developers a smooth transition
from a non object-oriented to an object-oriented approach.
Frame-based languages
in contrast to the previous category, these were explicitly developed to
deal with one particular application area,
knowledge-based reasoning.
A frame is a structure consisting of slots that may either indicate a relation
to other frames or contain the value of an attribute of the frame.
In fact, the early frame-based languages such as FRL, [FRL],
and KRL, [KRL], may be
considered as object-oriented avant la lettre,
that is before object orientation gained its popularity.
Later frame-based systems, such as KEE, [KEE],
and LOOPS, [LOOPS],
incorporated explicitly object-oriented notions such
as classes and (multiple) inheritance.
Concurrent, distributed and actor languages
To promote the use of parallel processing architectures
a number of parallel object-oriented languages
have been developed, among which are the language Hybrid
(which supports active objects with their own thread of control, [Nierstrasz]),
Concurrent Smalltalk (a concurrent extension of Smalltalk),
Orient-K (a language for parallel knowledge processing)
and POOL-T (which may be characterized as a simplified version
of Ada), see [YT87].
More recently sC++, an extension of C++ with synchronous active objects
has been proposed in [Petitpierre98].
A realisation of the same concept in Java has also been
proposed, albeit without compiler support, in [Petitpierre99].
POOL-T also supports the notion of active objects.
Active objects have a body which allows them to execute their
own activity in parallel with other active objects.
To answer a request to execute a method, an active object must
explicitly interrupt its activity (by means of an answer or
accept statement as in Ada).
POOL-T is interesting, primarily, because it is complemented
by extensive theoretical research into the semantical foundations
of parallel object-oriented computing.
See [BRR90] and
also section [semantics].
The idea of simultaneously active objects leads in a natural way
to the notion of distributed object-oriented languages
that support objects which may be located on geographically
distinct processors and which communicate by means of (actual)
message passing.
Examples of such languages are Distributed Smalltalk
(a distributed extension of Smalltalk that introduces so-called
proxy objects to deal with communication between
objects residing on different processors, [Bennett])
and Emerald (that supports primitives to migrate
objects across a processor network, [Black]).
All parallel/distributed object-oriented languages introduced
thus far are based on a traditional object model insofar as
an object retains its identity during its lifetime.
In contrast, the so-called actor languages support
a notion of object whereby the parallel activity of an object
is enabled by self-replacement of the object in response to a message.
Self-replacement proceeds as follows.
Each actor object has a mail-queue.
When a message arrives for the actor object,
the object invokes the appropriate method and subsequently
creates a successor object (which basically is a copy of itself
with some modifications that may depend upon
the contents of the message).
Message handling occurs asynchronously.
This scheme of asynchronous message passing enables an actor
system to execute in parallel,
since during the execution of a method the replacement object
may proceed to handle other incoming messages.
In actor systems, object identity is replaced by what
may be called mail-queue or address identity.
From a theoretical viewpoint this allows us to treat actor
objects as functions (in a mathematical sense) that
deliver an effect and another object in response
to a message.
However, pragmatically this leads to a complicated
and quite low-level object model which is hard to
implement in a truly parallel way.