Computer History  

Custom Search

Computer History
Tracing the History of the Computer - Eiffel Programming Language

 

Eiffel is an object-oriented programming language which emphasizes the production of robust software. Its syntax is keyword-oriented in the ALGOL and Pascal tradition. Eiffel is strongly statically typed, with automatic memory management (typically implemented by garbage collection).

With roots dating back to 1985, Eiffel is a mature language with development systems available from multiple suppliers. Despite this maturity and a generally excellent reputation among those who are familiar with it, Eiffel has failed to gain as large a following as some other object-oriented languages. The reasons for this lack of interest are unclear, and are a topic of frequent discussion within the Eiffel community.

Distinguishing characteristics of Eiffel include design by contract (DbC), liberal use of inheritance including multiple inheritance, a type system handling both value and reference semantics, and generic classes. Eiffel has a unified type system - all types in Eiffel are classes.

Eiffel makes it possible to define operator syntax for any function, with operator overloading and method overloading across classes but not within a class.

Design goals

The Eiffel language aims to promote clear and elegant programming. Eiffel emphasizes declarative statements over procedural code, and eliminates the need for bookkeeping instructions.

Eiffel shuns coding tricks or coding techniques intended as optimization hints to the compiler. The aim is not only to make the code more readable, but also to allow programmers to concentrate on the important aspects of a program without getting bogged down in implementation details. Eiffel's simplicity is intended to promote simple, extendible, reusable and reliable answers to computing problems.

Lexical simplicity

Eiffel is not case-sensitive. Keywords and identifiers can be written in any combination of upper and lower case. The tokens MaKe, make, and MAKE all refer to the same identifier. Coding standards, however, generally prescribe the use of all-capitals for class names, all-lower-case for variables and method names, and initial capitals for constants, with underscores separating words.

     

Eiffel's syntax can be parsed without requiring end-of-instruction markers. The use of semicolons as instruction terminators or as instruction separators is left to the discretion of the programmer. Putting a semicolon in or leaving one out makes no difference, except in the unusual case of an instruction starting with a left parenthesis. Most Eiffel programmers choose to omit semicolons except when putting multiple statements on a line.

Eiffel requires that sections and clauses appear in a specific order.

In contrast to most curly bracket programming languages, Eiffel does not let expressions be used as instructions, nor instructions be used as expressions. Thus, a routine which returns a value can only be used in expressions, while a routine which does not return a value can only be invoked as an instruction.

This philosophy - that expressions and statements are fundamentally different in nature - is expanded into the concept of Command-Query Separation (CQS). Under CQS, a query routine (a function which returns a value) must not change the state of the object, while a command routine will change the state of the object but will not return a value. CQS is strongly recommended for Eiffel programming, but is not actually enforced by the Eiffel system.

Unlike most programming languages, Eiffel is not normally displayed in a monospaced typeface. The recommended display style is to use a proportional typeface. Keywords are shown in bold, user-defined identifiers and constants are shown in italics. Standard upright (roman) style is used for comments, operators, and punctuation marks.

Syntactic simplicity

Eiffel has only six basic executable instructions:

  • assignment
  • object creation
  • routine call
  • conditional
  • iteration
  • choice (case)

Unlike many object-oriented languages, but similar to Smalltalk, Eiffel does not permit storing into fields of other objects. The assignment instruction can only change the value of a field of the current object, or a local variable of the current routine. All changes to other objects must be accomplished by calls to methods of that object. Direct access to fields of other objects is "read only" in Eiffel.

The iteration (loop) instruction in Eiffel does not provide a field or clause which will step the loop. The programmer must express the stepping as part of the loop. For example:

  from i := 0 until i >= 10 loop
     my_array.put (0, i)
     i := i + 1
  end

The example above also illustrates that Eiffel treats arrays simply as instances of the class ARRAY, providing access in the form of routine calls, in line with object-oriented ideas. Eiffel compilers optimize this access.

Eiffel's procedural coding is strictly structured. There are no instructions for exiting a loop or routine early.

Non-object-oriented operations

Eiffel is a purely object-oriented language. Any coding which must be "close to the machine" is expected to be done in C. Eiffel provides a straightforward interface to C routines, including allowing for straight C calls within Eiffel code. Eiffel is generally closely connected to C: three of the four Eiffel compilers output no object or machine code, but only C source code as an intermediate language, to submit to a C compiler, for optimizing and portability.

Background of Eiffel

Eiffel was originally developed by Bertrand Meyer and his company Interactive Software Engineering (ISE), since renamed Eiffel Software, Inc. Eiffel closely follows Dr. Meyer's work in Object Oriented Software Construction, Second Edition. Eiffel differs from most popular languages in several ways.

The goal of the language, libraries, and programing methods is to create reliable, reusable software modules. It supports multiple inheritance, genericity, polymorphism, encapsulation, and parameter covariance. Its most important contribution to software engineering is Design by contract (DbC), in which assertions, preconditions, postconditions, and class invariants are used to assist in assuring program correctness without sacrificing efficiency.

Eiffel also offers multiple class inheritance. Many people (such as the designers of Java) have objections to multiple inheritance. The Eiffel implementation of multiple inheritance, in the opinion of its supporters, successfully meets these objections.

Eiffel's design is closely based on Object-Oriented Programming (OOP) theory, with less influence from other paradigms or support for legacy code. The language has formal support for abstract data types. In accordance with Self Documentation, a software text should be able to reproduce its design documentation from the text itself. Eiffel accomplishes this by using a formalized implementation of the Abstract Data Type.

EiffelStudio, an integrated development environment for Eiffel that has recently become open source software, offers an object-oriented interface for software engineering. However, many programmers dislike it because its user interface is very different from other integrated development environments. There are two alternative, also open source implementations, SmartEiffel - the GNU implementation, and Visual Eiffel, which provides a more "traditional" interface. So does EiffelEnvision, a plugin for Microsoft Visual Studio which allows users to edit, compile, and debug Eiffel apps from within the Microsoft Visual Studio IDE. EiffelStudio and EiffelEnvision are only free for non-commercial use, though.

Specifications and standards

On the 21 June 2005 the European Computer Manufacturers Association (ECMA) approved the first international standard for Eiffel ECMA standard 367, Eiffel Analysis, Design and Implementation Language. The standard is currently (March 2006) up for acceptance as an International Standards Organization (ISO) standard.

This standard is not accepted by the SmartEiffel team, which has decided to create its own version of the language, because they think the ECMA standard throws away important principles of the original language. Eiffel Software and Gobo have committed to implementing the standard. Object Tools has not to date expressed a position.

The standard cites the following as earlier Eiffel Language specifications:

  • Bertrand Meyer: Eiffel: The Language, Prentice Hall, second printing, 1992 (first printing: 1991)
  • Bertrand Meyer: Standard Eiffel (revision of preceding entry), ongoing, 1997-present, at Bertrand Meyer's ETL3 page, and
  • Bertrand Meyer: Object-Oriented Software Construction, Prentice Hall: first edition, 1988; second edition, 1997.

The ETL3 page requires a password for access which can be found at Bertrand Meyer's Home Page under Work in progress

[edit] Differences between SmartEiffel and other implementations SmartEiffel is currently unable to compile the open-source EiffelBase library from Eiffel Software.

A "Hello World" program in Eiffel

class HELLO_WORLD

create

   make

feature

   make is

      do

         io.put_string ("Hello, world!%N")

      end

end

Resources

History of Programming Languages

Source: http://en.wikipedia.org/wiki/Eiffel_%28programming_language%29

Copyright Notice for Computer Nostalgia

 Disclaimers 

  Privacy Policy 

 GNU License