Eiffel (programming language)
Eiffel is a universal, pure object- oriented programming language and was founded in 1985 by the French computer scientist Bertrand Meyer and his company, Interactive Software Engineering Inc. ( Goleta, CA ) as an alternative to C designed. Originally, it was intended only for use by their own company.
The programming language
The name Eiffel, an homage to Gustave Eiffel, builder of the Eiffel tower and one of the great engineers of the 19th century, documented claim to have created a programming language which is made possible with the software development according to the standards of engineering, as they are the findings of the software Engineering consistently implemented.
This is in contrast to C to produce a completely new design, which is based on any older language. Goal of the development is to create a tool with Eiffel in order to construct extensive software from reliable, reusable and easily maintainable and testable modules. These are potentially risky ways of programming ( manual memory management, global variables, undisciplined type conversions, direct pointer manipulation, Goto, etc. ) largely excluded optimizations (especially concerning the execution speed, such as inline substitution ) delegated to the compiler. The consistent object-oriented approach to the design in the Great is supplemented by (rather strict ) application of structured programming in detail, ie at the level of the individual routine ( in the Eiffel terminology: the single " feature" ).
The syntax is influenced by Ada and Algol family of languages ( Algol, Pascal, Modula ). You should be especially easy to read.
The language definition of Eiffel is public domain and is under the control of Nonprofit International Consortium for Eiffel (NICE ); this organization has the right to validate any development tool with regard to conformity to the language definition, before it may carry the name Eiffel.
On 21 June 2005, the Standard ECMA -367 Eiffel Analysis, Design and Programming Language was adopted in Amsterdam in the 89th General Meeting of the ECMA. He is the currently valid specification of the programming language, now called Standard Eiffel.
- Static type checking
- Automatic garbage ( "garbage collection" )
- Multiple inheritance; resulting name conflicts can be resolved by renaming ( "Renaming " )
- Abstract classes ( " deferred classes " )
- Generic classes (templates in C )
- By default, dynamic binding; where possible, the compiler optimize efficient static binding
- Elements of Functional Programming ( " tuples " and " Agents" )
- ( Prefix and infix ) operators can such functions be agreed
- Exception Handling
- Interface to other programming languages , and in particular C, and C
- Standard library ( in the periphery of the C equivalent)
A specialty of Eiffel is to support the design -by - contract principle in the development. For this purpose, the language differentiated means ( pre-and postconditions as well as invariants ) ready, in a systematic way with ( disconnectable ) assurances (assertions ) to monitor classes their individual functions, as well as whole class hierarchies for correctness of the processes and conditions during the term.
Safety and simplicity
- No Overloading of functions and operators - a name or operator must not be defined more than once in a class
- Only a universal loop type with explicitly specifiable variant and invariant (optional)
- No special syntax for indexing arrays and strings
- No distinction between " attributes " (variables ) and functions with no parameters for the user of a class
- Attributes of an object can not be changed by assigning the outside
- No program text outside of classes, so in particular no global variables
- Routines can not change the value of its formal parameters
- Upper / lower case is not significant
- Semicolon is not required for the separation of instructions
- Separate namespaces for class names and other names
- Neither a general jump instruction ( goto ) nor special, such as continue, break, return
- No unsafe casting of types
- No pointer arithmetic
- Objects can only be at runtime "void " when explicitly required (void safety )
Construction of a Eiffel program
An Eiffel program consists only of classes. Each class is a separate module. When compiling a root class is defined by an instance when starting the program is generated.
Example program in Eiffel
Class HELLO - Liberty Eiffel create make feature make is do io.put_string ("Hello World. % N") end end class HELLO - ECMA Eiffel create make feature make do io.put_string ("Hello World. % N") end end explanation
With class HELLO HELLO the class is created. The create clause defines the make- method as a constructor. In this example, make the main method as Java. Which class is the Rootklasse, and what method of this class should be called first, is in the configuration file ( eiffel configuration file *. Ecf ) defines the project. Without a constructor, it is not possible to create an instance of the class.
Areas of application
As an application areas for which Eiffel offers especially, are called:
- Safety-critical applications
- Design and specification
- Implementation of complex data structures
- Training in object oriented programming
One of the most common compiler is EiffelStudio by Eiffel Software company of the inventor of language, Bertrand Meyer. EiffelStudio is since April 2006 also licensed under the GPL (dual licensing system ). Together with Visual Eiffel, the currently under development tecomp and GEC ( from the gobo class library), there are thus four open-source compiler. Smart Eiffel (formerly Small Eiffel ) is not implemented after the announcement of the developer, however, the currently valid standard ECMA -367, but evolve in a different direction (but Eiffel remain similar ). Since November 2013, the first official version of the Smart Eiffel successor Liberty Eiffel is released. Liberty Eiffel is a GNU project and is looking for other fellow.
Eiffel is unable to obtain the distribution of C or Java to this day. There is also none of the major software or IT companies behind Eiffel (like the example in Java or. NET is the case ).
The source code is usually compiled into the machine code of the target machine. This is done via the detour of the conversion of the Eiffel sources into C code, with the exception of Visual Eiffel, which directly generates x86 code for Windows and Linux. The machine code is generated in this way depending on the application compared with the corresponding C- or C code.
There are also approaches, Eiffel directly translate into bytecode. Eiffel Software offers under the product Eiffel Envision! generates an Eiffel version, which integrates with Visual Studio.NET and Common Intermediate Language (CIL ). Smart Eiffel has a back-end for Java bytecode.
Since November 2013 is the successor of smart Eiffel, Liberty Eiffel, prepared as a stable version for download. Liberty Eiffel is a GNU project aims to combine the Smart Eiffel and parts of ECMA- Eiffel.