Object terminology
Instructor's Guide
introduction
themes
paradigms
lifecycle
trends
summary
Q/A
literature
Object-orientation originally grew out of
research in programming languages.
The first object-oriented language was Simula.
However, Smalltalk may be held responsible for the initial popularity
of the object-oriented approach.
The terminology Smalltalk introduced was at the time
unfamiliar and, for many, somewhat hard to grasp.
Nowadays, students and IT specialists, have at least heard the
object-oriented jargon. Let's briefly look at it.
See slide [1-speak].
Objects provide the means by which to structure a system.
In Smalltalk (and most other object-oriented languages) objects are considered to
be grouped in classes. A class specifies the behavior of the objects that
are its instances. Also, classes act as templates from which actual objects may be created.
Inheritance is defined for classes only.
From the perspective of design, inheritance is primarily meant
to promote the reuse of specifications.
Object terminology
object speak
- objects -- packet containing data and procedures
- methods -- deliver service
- message -- request to execute a method
- class -- template for creating objects
- instance -- an object that belongs to a class
- encapsulation -- information hiding supported by objects
- inheritance -- mechanism allowing the reuse of class specifications
- class hierarchy -- tree structure representing inheritance relations
- polymorphism -- to hide different implementations behind a
common interface
slide: Object terminology
The use of inheritance results in a class hierarchy
that, from an operational point of view,
determines the dispatching behavior of objects,
that is what method will be selected in response to a message.
If certain restrictions are met
(see sections [contracts],
[subtypes]
and [behavioral-types]),
the class hierarchy corresponds to a type hierarchy,
specifying the subtype relation between classes of objects.
Finally, an important feature of object-oriented
languages is their support for polymorphism.
Polymorphism is often incorrectly identified with inheritance.
Polymorphism by inheritance makes it possible
to hide different implementations behind a common interface.
However, other forms of polymorphism may arise by overloading functions
and the use of generic (template) classes or functions.
See sections [polymorphism] and
[flavors].