[Logo-Eiffel:Advance Intro]

Object-Oriented Language Design

by Alan Snyder
Email: 74741.2430@compuserve.com

Table of Contents

Overview

Hybrid vs. Object-Oriented

   Hybrid
      Benefits
      Losses

   Object-Oriented
      Benefits
      Losses

Object-Oriented Characteristics

   Inheritance

      Repeated Inheritance
      Name collissions

   Polymorphism

   Generic Abstraction

Eiffel's Aim

Design by Contract

Eiffel's Features

Summary

Sources

Overview

The future (and present) of software development is no doubt in the hands of the object-oriented paradigm. Object-oriented methodologies have touched virtually every aspect of the software development cycle from design through implementation. It has affected database technology, artificial intelligence, and virtual reality alike. Obviously these fields recognize the potency of an object-oriented model, as does the author.

The purpose of this paper though is not to contend the object paradigm, nor to praise it; rather it is to state the characteristics of the paradigm that give it its power and flexibility, and to state how these features should be reflected in an appropriate language. For this, the focus will remain on the software development cycle, and no mention of other fields will be made from herein.

The importance of software design is very critical to the success of a project. The author does not contest the importance of this stage of the development cycle. It should be stated though, that even the best programmers, when given a thoroughly documented and concise design, can not always produce correct and safe code; not by fault of the programmer, but of the language chosen. That is to say, given a good design, be it object-oriented or just flow charts and state diagrams, an equally good implementation should mechanically follow without further concern. Unfortunately with most of today's languages, this is almost never the case. Where one language fails in versatility, another falls short in safety or simplicity.

Hybrid verses Pure Object-Oriented

Object methodologies were born during a time when procedural programming was abundantly dominant. As a result, some languages (C++, Object Pascal, Modula-3, Oberon-2) combine the procedural aspect of programming with an object-oriented interweaving. These languages are called hybrids, as opposed to a pure-breed object-oriented language which only supports the class as its major data construct. There are benefits and losses to be taken from each perspective:

Object-oriented characteristics

There are several important characteristics of the object-oriented paradigm that must be supported in a language, if that language is to be considered as sufficient for object-oriented applications:

Eiffel's Aim

Does any Language meet these specifications?

Surprisingly, the answer is yes! The language is called Eiffel. Eiffel's approach to software development leans toward software engineering rather than just implementation from design. In "Eiffel: The Language" by Bertrand Meyer who fathered the language:

"The aim of Eiffel is to help specify, design, implement and change quality software...techniques such as assertions, discliplined exception handling and static typing, enabling developers to produce software with dramatically fewer bugs, are part of Eiffel's approach to the engineering of quality software."
Later, he writes:
"Great attention was...paid to three essential aspects:
  • Enabling implementors to produce language processing tools (especially compilers) of high efficiency, so that systems developed in Eiffel may run under speed and space conditions comparable to those of programs written in lower-level traditional languages.

  • Ensuring openness, so that Eiffel software may cooperate with programs written in other languages.

  • Guaranteeing portability by a platform-independent language definition, so that the same semantics may be supported on many different platforms."

Design by Contract

Eiffel's approach to software construction is based on a theory developed by Bertrand Meyer called Design by Contract:
"The unerlying theory of Design by Contract views software construction as based on contracts between clients (callers) and suppliers (routines), relying on mutual obligations and advantages made explicit by the assertions."

"Assertions play a central part in the Eiffel method for building reliable object-oriented software. They serve to make explicit the assumptions on which programmers rely when they write software elements that they believe are correct. Writing assertions, in particular preconditions and postconditions amounts to spelling out the terms of the contract which governs the relationship between a routine and its callers. The precondition binds the callers; the postcondition binds the routine."

Eiffel's features

Some of the main features of Eiffel worth mentioning include:

Summary

It is the opinion of the author that Eiffel is the best defined object oriented language today. Its detailed attention with respect to inheritance mechanisms, polymorphism, and safe software construction make it extremely suitable for large, industrial applications. Eiffel provides total flexibility of classes and all respective features for truly reusable, safe, and reliable software systems.

Sources: