Frequently Asked Questions on the Eiffel Language
- What is Eiffel?
- Where does the name come from?
- How did Eiffel come about, and what is its history?
- What is EiffelStudio™?
- Ok, so what is the difference between Eiffel and EiffelStudio?
- Is Eiffel intended for any specific
- What about operating systems then? Where does Eiffel run?
- Won’t I have to forsake my existing software thus losing millions of dollars?
- How fast is Eiffel’s run-time performance?
- What is Melting Ice Technology?
- Is it true that Eiffel compiles into C?
- What about graphics?
- What about relational databases?
- What does the IDE look like?
- What does an Eiffel program look like?
- What does a class look like?
- A counter is great but how do I write a real system?
- What about reusability?
- Assertions look great, but how do they help me?
- What about repeated inheritance?
- Tell me about typing and binding
- What is BON?
- What is this Design by Contract™ mechanism, and how will it change my life?
- What can Eiffel bring to me that other languages such as C++,
C#, and Java cannot?
- How long will it take to learn
- What is multiple inheritance?
- Why is multiple inheritance so clean in Eiffel?
- What is concurrent engineering?
- What is genericity?
- Is Eiffel transparent in .NET?
- How does Eiffel for .NET produce reusable components?
- I have a several classes in VB.NET and C# do I need to rewrite them in Eiffel?
- What UML tools does Eiffel support?
- How do you create a web service in Eiffel?
- Is Eiffel good for Agile Programming?
What is Eiffel?
Actually, in this case it is short for “The Eiffel Development Framework™” – a comprehensive approach to software development. It consists of the Eiffel methodology for the beginning-to-end construction of robust, reusable software; the Eiffel language, which supports the methodology; and EiffelStudio™, the environment that contains the Eiffel compiler and the complete set of productivity tools which make the development environment. The individual parts fit together with and support each other’s function in the pursuit of making the best software possible.
No other software development system has been designed to work in such a simple and powerful way. The results of this approach and design are staggering. Productivity increases. Cost of ownership goes down. Quality levels go up.
Eiffel takes companies’ software to a level of efficiency and reliability far above the capabilities of other languages and development tools.
Where does the name come from?
Eiffel is named after Gustave Eiffel, an engineer who created the famous tower. The Eiffel Tower, built in 1887 for the 1889 World Fair, was completed on time and within budget, as will software projects written in Eiffel. If you look at that wonderful structure, you will see a small number of robust design patterns, combined and varied repeatedly to yield an extremely powerful, bottom-up structure – exactly like a system built out of Eiffel Software’s reusable libraries. Like many software systems today, the Eiffel Tower was initially conceived as a temporary structure; and like many systems built with Eiffel, it was able to endure far beyond its original goals.
How did Eiffel come about, and what is its history?
Eiffel was designed at Eiffel Software (then known as ISE) in 1985, initially as an internal tool to develop various internal applications. Eiffel Software engineers needed a powerful, object-oriented environment integrating the concepts of modern software engineering, and there was simply nothing available. This is why, Dr. Bertrand Meyer, founder of Eiffel Software, designed for them the The Eiffel 1 compiler. It was introduced to the public at the first OOPSLA conference in October of 1986 where it attracted considerable attention, leading us to release it as a commercial product at the end of 1986. The technology spread rapidly over the following years, leading to a set of successful industrial projects in the US, Canada, Europe and the Far East. Right from the start, Eiffel also attracted attention from the academic community as an ideal tool for teaching programming at all levels. Numerous universities around the world have since used it as the primary teaching language.
Successive versions of the environment appeared at the rate of about once a year. Eiffel recognition was given wider visibility with the publication in 1988 of the book Object-Oriented Software Construction by Dr. Bertrand Meyer, which quickly became a best-selling title and was translated into eight languages; the book used Eiffel to explain and illustrate the fundamental concepts of object technology and Design by Contract™. Since then, an expanded new edition of this book has been released: Object-Oriented Software Construction, 2nd Edition.
The last iteration of the original technology was version 2.3, released in the Summer of 1990. The next version, Eiffel 3, was written entirely in Eiffel; it was bootstrapped from 2.3. Eiffel 3 introduced the Melting Ice Technology for fast recompilation, a fully graphical environment based on innovative user interface concepts, and considerable advances in libraries (graphics, networking…) and optimization of the generated code. The initial versions were released on Unix and followed by Linux, VMS, OS/2, Windows (Windows 3.1, Windows 95, Windows NT), .NET, and Mac OS X.
Today, the Eiffel technology continues to push the frontiers of software development. With the introduction of EiffelStudio, programmers can take advantage an efficient IDE for achieving highest-quality, robust, scaleable, reusable software applications – on all major platforms.
What is EiffelStudio?
EiffelStudio is the Integrated Development Environment (IDE) designed exclusively for the Eiffel Object-Oriented language. Seamlessly addressing the whole life cycle of software development, EiffelStudio provides facilities that will help your team to develop from initial design time, right through deployment, testing, and maintenance. Built in functionalities such as Computer Aided Software Engineering (CASE) tool for the Business Object Notation (BON) method allow you to see and interact with the design of your system during development, and there is no need for reverse engineering as everything is done concurrently. EiffelStudio also has superb browsing mechanisms for viewing information about your code and it performs and behaves at execution. From full feature browsing, to built in metrics and profiling, EiffelStudio can give you information on almost anything about your system.
Centered around the Design by Contract™ methodology, EiffelStudio’s debugger will allow your software to find the bugs for you, minimizing the costs of maintenance that systems designed with other languages have to endure. Coupled with a browsable editor, EiffelStudio allows you to navigate to any part of your system to track down and fix the so called ‘hard to find’ bugs, reducing project costs even further.
What is the difference between Eiffel and EiffelStudio?
Eiffel is the language a developer uses to write great software. EiffelStudio is the environment and toolkit that surrounds the Eiffel language.
Is Eiffel intended for any specific application area?
Not specifically. Eiffel shines in ambitious systems that need to adapt to changing market and user demands. It brings many benefits to serious application development and is used in various industries, from financial applications to manufacturing, product configuration control, healthcare, telecommunication systems, defense ….
Eiffel scales up thanks to its abstraction and structuring facilities. It is one of the few environments that won’t let you down when your project (or company) grows in size, scope, and ambition.
What about operating systems then? Where does Eiffel run?
Eiffel is very portable, a feature that developers love. It runs just about everywhere, including Windows (classic and .NET), Unix, Linux, VMS, and Mac OS X. This allows developers the flexibility to maintain their legacy code while developing new code on a completely different operating system.
Won’t I have to forsake my existing software, thus losing millions of dollars?
Absolutely not. Eiffel is an open system, at its best when used as a combination technology to reuse software components written in various languages. In particular, Eiffel includes a sophisticated C and C++ interface, supporting:
- Calling C functions from Eiffel.
- Accessing C++ classes and all their components (functions or “methods”, data members, constructors, destructors etc.) from Eiffel.
- Accessing Eiffel mechanisms from C or C++ through the Cecil library (C-Eiffel Call-In Library).
- Automatically producing a “wrapper” Eiffel class from a C++ class.
Eiffel makes it possible to move to modern software technology while reusing the best results of earlier practices.
How fast is Eiffel’s run-time performance?
FAST. Eiffel Software has shown that it is possible to utilize the full power of modern object technology without sacrificing run-time performance. Various benchmarks show run-time efficiency similar to C and Fortran, and in many cases better.
What is Melting Ice Technology?
Eiffel Software’s unique incremental compilation technology which combines compilation, generating optimally efficient code, with bytecode interpretation, for a fast turnaround after a change.
Is it true that Eiffel Compiles into C?
Yes. The Eiffel compiler generates an internal form known as “bytecode”. The bytecode can be interpreted directly, but it can also be translated into other forms.
To generate the final version of a system, the bytecode is optimized and translated into C, to take advantage of the presence of C compilers on just about every platform under the sun. This is the process known as “finalization”, which performs extensive optimizations (routine inlining, static calls, array optimization), permitting performance achievements.
Using C as an intermediate language takes advantage of the platform-specific optimizations performed by C compilers, and most importantly, facilitates interoperability with software written in C and C++.
What about graphics?
Eiffel offers a choice of graphical libraries for a variety of application scenarios.
For portable projects, EiffelVision is a high-level graphical library covering user interface objects (windows, dialogs, menus, buttons, dialog boxes etc.) as well as geometrical figures (polygons, circles and the like) that will run on all the supported platforms, adapting in each case to the native look-and-feel.
For platform-specific projects, to take advantage of the full set of “controls” or “widgets” available on a particular window system, the platform-specific libraries are available:
- On Windows, WEL (the Windows Eiffel Library) gives access to essentially all the Windows graphical API, including the most recent controls. A separate page describes how WEL combines the advantages of Windows and Eiffel. An extensive WEL tutorial is available on-line, as well as a general presentation of the design of WEL.
- On Unix, Linux and VMS we provide GEL, the GTK Eiffel Library.
Using EiffelVision or one of the platform-specific libraries is not an exclusive proposition: you can mix-and-match the two levels, using EiffelVision for its abstract capabilities, and for example, WEL to take advantage of specific Windows controls. In fact, EiffelVision internally relies, for its implementation on each platform, on the corresponding platform-specific library, so you already have WEL if you are using EiffelVision on Windows.
What about relational databases?
Eiffel Software provides the EiffelStore library for object-relational interfaces, with mappings available for ODBC (giving access to dozens of database systems on Windows), Oracle, Sybase and Ingres.
Eiffel has also been interfaced with such object-oriented databases as Matisse, Versant, and O2.
What does the IDE look like?
EiffelStudio is a fully graphical environment that includes all you would expect and more: analysis and design workbench with round-trip (or reversible) engineering, fast recompilation, editing, sophisticated browsing facilities, automatic documentation (see for example the descriptions of the “short form” below), an advanced debugging mechanism, etc.
Just as an illustration, with further explanations available in the Online documentation, below is a screenshot from EiffelStudio:
For more views, see EiffelStudio sreenshots page.
What does an Eiffel program look like?
Actually we like to talk about “systems” — a set of classes — each covering a “data abstraction” — a certain set of objects from the external world or from the implementation. For example, you may have classes AIRPORT, RADAR and RUNWAY in a flight control system, classes CUSTOMER and ACCOUNT in a banking system. In any system you can also have general-purpose classes such as LINKED_LIST and HASH_TABLE, although you would not normally write them but reuse them from a library such as EiffelBase.
What does a class look like?
Here is the outline of a simple class COUNTER describing a counter:
indexing description: "Counters that you can increment by one, decrement, and reset" class COUNTER feature -- Access item: INTEGER -- Counter's value. feature -- Element change increment is -- Increase counter by one. do item := item + 1 end decrement is -- Decrease counter by one. do item := item - 1 end reset is -- Reset counter to zero. do item := 0 end end
At run time this class will have instances: each instance is an object that represents a separate counter. To create a counter you declare the corresponding entity, say
create the corresponding object
(where create is the object creation operation), and can then apply to it the operations of the class (its features):
my_counter.increment ... my_counter.increment ... my_counter.decrement ... print (my_counter.item)
Such operations will appear in features of other classes, called the clients of class COUNTER.
If you understand this example, you already know a fair deal of Eiffel! Note how simple the syntax is. Semicolons between instructions are optional (they have been omitted above); no strange symbols, no complicated rules.
A couple more comments about this example: all values are initialized by default, so every counter object will start its life with its value, item, initialized to zero (you don’t need to call reset initially). Also, `item’ is an attribute, which is exported in read-only mode: clients can say
but not, for example,
my_counter.item := 657
which would be a violation of “information hiding”. Of course, the class author may decide to provide such a capability by adding a feature
set (some_value: INTEGER) is -- Set value of counter to some_value. do item := some_value end
in which case the clients will simply use
But that’s the decision of the authors of class COUNTER: how much functionality they provide to their clients.
The indexing clause at the beginning of the class does not affect its semantics (i.e. the properties of the corresponding run-time objects), but attaches extra documentation to the class. Such information can be used to help developers search for reusable classes. It is good practice to include at least a description entry providing an informal description of the purpose of the class.
A counter is great but how do I write a real system?
The principles scale up. A class can represent a counter, but it can also represent an assembly line or a factory.
The Eiffel mechanisms for abstraction, reliability, and simplicity provide a power of expression unmatched in the software world.
What about reusability?
As Roland Racko wrote in Software Development:
“Everything about Eiffel is single-mindedly, unambiguously, gloriously focused on reusability — right down to the choice of reserved words and punctuation and right up to the compile time environment”.
We couldn’t have said it better. Eiffel was designed from day one to be the vehicle for the new software industry, based on the reuse of high-quality components — rather than on everyone reinventing the wheel all the time.
This saves organizations countless hours and thousands of dollars in wasted development time.
Eiffel has put these ideas into practice by providing a rich set of professional reusable libraries (several thousand carefully crafted classes): EiffelBase, EiffelVision, EiffelNet, EiffelWeb, EiffelParse, EiffelLex, WEL, MEL, PEL etc.
Assertions look great, but how do they help me?
Assertions radically improve the nature of software development. They have three major benefits:
- Design aid: by working with Design by Contract, you build software together with the arguments that justify its correctness. This makes it much more realistic to produce bug-free software.
- Testing and debugging mechanism: using the Eiffel compiler, you select which assertions will be monitored at run time
and you can set different levels (no check, preconditions only, preconditions and postconditions, everything) separately for each class. Then if an assertion is found at run time to be violated — meaning a bug remains in your software — an exception will interrupt execution. This is a tremendous help for getting software right quickly.
Testing and debugging are no longer blind searches. They are helped by a precise description both of what the software does (the actual executable texts, given by the do clauses) and of what it should do (the assertions).
- Automatic documentation: to give the users of a class a precise description of what a class provides, without giving out implementation details, you use the Eiffel notion of the short form of a class, which keeps the feature headers and comments as well as their assertions, but discards any implementation stuff. For example:
indexing description: "Counters that you can increment by one, decrement, and reset" class interface COUNTER feature -- Access item: INTEGER -- Counter's value. feature -- Element change increment is -- Increase counter by one. ensure count_incresed: item = old item + 1 decrement is -- Decrease counter by one. require count_not_zero: item > 0 ensure count_decreased: item = old item - 1 reset is -- Reset counter to zero. ensure counter_is_zero: item = 0 invariant positive_count: item >= 0 end
In EiffelStudio, you get the short form at the click of a button. The short form is an ideal form of documentation, abstract yet precise. Best of all, it is produced automatically by the environment, not written separately, so you don’t need to do any work to get it! No need to write “interface modules” and then repeat their information in the implementation part.
What about repeated inheritance?
Repeated inheritance is the case (illustrated by the figure below) in which a class inherits from another through two or more paths. Only in Eiffel can you decide separately for each feature of the common ancestor, such as `birth_date’ or `library_privileges’ in the example, whether it gives one feature or two in the repeated descendant. In the figure, a teaching assistant has the same birth date whether viewed as an instructor or as a student (one feature), but has different library privileges under each of these capacities (two features). This flexibility is indispensable to specify what you want to share and what you want to replicate.
Tell me about typing and binding.
Eiffel is statically typed to ensure that errors are caught at compile time, not run time. For example if your system may mistakenly try to execute a request to compute the diagonal of a graphical object that happens to be a triangle, the Eiffel compiler will catch the error before it has had time to cause any damage. Most other object-oriented languages use some degree of “dynamic typing” in which such errors can escape the compiler. (Beware in particular of C extensions that are sometimes advertised as statically typed but still permit almost arbitrary type conversions.)
Eiffel is dynamically bound to guarantee that the right version of an operation will always be applied depending on the target object. For example if you apply the feature “take off” to an object representing some kind of plane, you have the guarantee that if there are several plane types, each with its own `take_off’ feature, the appropriate one will always be automatically selected. (In contrast, some approaches by default use “static binding”, which can result in disastrously incorrect behavior.)
What is BON?
BON is the acronym for Business Object Notation, an analysis and design method that is based on concepts close to those of Eiffel (seamlessness, reversibility, contracting) and defines simple, intuitive graphical conventions. BON is particularly notable for its ability to scale up when you need to describe large and complex systems, keeping a view of the whole while zooming into the details of components at various levels of abstraction. EiffelCase, the Diagram Tool of EiffelStudio, supports BON. The method is described in the book, “Seamless Object-Oriented Software Architecture”, by Kim Walden and Jean-Marc Nerson, that is available online.
What is this Design by Contract™ mechanism, and how will it change my life?
Design by Contract (DbC) is a unique mechanism that supports the production of quality software. It ensures that your code will have substantially less errors because it follows ‘the rules’ of development. Our customers tell us that thanks to DbC they cut the number of bugs, reduce testing costs, and quickens time to market.
What can Eiffel bring to me that other languages such as C++, C#, and Java cannot?
Clean clear syntax, reusability, native Design by Contract, support for the full software lifecycle, portability, openess … In short, the ability to finish projects on schedule and enhanced productivity in all stages of development.
How long will it take to learn Eiffel?
With simple and easy to read syntax, Eiffel is intuitive and user friendly. It takes 4-7 days on average to become comfortable with the language and not much more to master the environment. To get a head start with Eiffel, visit the Presentations page.
What is multiple inheritance?
Multiple inheritance is an mechanism whereby a software unit, known in Eiffel as a class, may inherit the features of many other classes. Most modern programming languages support single inheritance whereby a class can inherit from only one other class, but multiple inheritance offers the developer unrestricted inheritance through the ability to inherit as many as is desired. Using multiple inheritance brings the following advantages: improved reuse, better overall system design and architecture, greater flexibility, easier maintainability and debugging.
Why is multiple inheritance so clean in Eiffel?
Eiffel tames the power of multiple inheritance through a renaming mechanism that eliminates name clashes, and through a selection facility to remove any ambiguities resulting from multiple redeclarations. Without multiple inheritance, you would lose much of the reusability benefits of the object-oriented method. For example, not all comparable elements are numeric (think of strings) and not all numeric elements are comparable (think of matrices). Without multiple inheritance, you would not be able to select one of these properties when you need to or both when required.
What is concurrent engineering?
Concurrent engineering allows the use of EiffelStudio to automatically generate BON diagrams to see and interact with the overall design of your system as you engineer it.
What is genericity?
Genericity is the support for type-parameterized class modules in the software text. In object-oriented circles these are known as generic classes. Such classes use generic parameters in the software text, which are then substituted for formal parameters when the class is actually used by a client class. The benefits of such a method is most fully realized in classes when you consider container objects such as arrays and lists. These types are designed to hold a number of arbitrary elements. Ideally, these contained elements should be able to be any type of element, from books to customers to any type available in your system. Otherwise, you would have to write a separate class definition for every type of element you wish to store, a painful and time consuming activity. Genericity solves this problem by assuming a generic type, which will be substituted by the actual type at runtime.
Eiffel for .NET Questions
Is Eiffel transparent in .NET?
Yes. Eiffel for .NET can be used in exactly the same way as classic Eiffel and no extra language constructs are required to produce applications.
Eiffel brings quite a few unique and powerful features to .NET. Most noticeably it is the only .NET language to offer multiple inheritance and genericity since the first version of the .NET Framework. These two mechanisms are an indispensable aid to creating fully reusable software in a truly object-oriented way.
Eiffel for .NET also brings the full benefits of Design By Contract, ensuring correctness of the software text, reliability, and robustness. Whilst some other .NET languages do support contract mechanisms, Eiffel for .NET is the only one to support them natively, as an actual language construct.
Eiffel also brings some existing libraries to .NET, so aside from being able to use other .NET libraries such as Windows.Forms for graphical elements you could instead use Eiffel’s WEL or EiffelVision2 libraries. EiffelVision2 is a particularly unique graphical library since it is multi-platform, thus ensuring that the compiled system will produce the same display and behavior on all supported platforms.
How does Eiffel for .NET produce reusable components?
Eiffel for .NET produces reusable components simply by compiling to the Common Intermediary Language (CIL) code which makes it available for use by any other .NET supported language. However, this method of reuse is only one type of reuse in action, namely the reuse of software components. There are many other levels and areas of potential reusability.
The Eiffel compiler can also produce the so-called ‘precompiled libraries’ that can then be reused from another Eiffel project. The advantages of using a precompiled library over just referencing an assembly include the ability to reuse native Eiffel constructs (such as multiple inheritance and genericity) without having to recompile the whole source.
The Eiffel language was developed with such levels of reuse in mind from the very beginning and these can benefit the developer in many ways. Multiple inheritance and genericity provide reuse within the actual software implementation, eliminating the need to repeat the same code in different classes – if you need the functionality provided by a class then become a client or inherit from it. Likewise if much of your code does similar things with only small variations you can abstract it into a class or library. This practice is employed and can be seen in the reusable libraries provided with EiffelStudio or Eiffel ENViSioN!.
I have several classes in VB.NET and C#. Do I need to rewrite them in Eiffel?
No. Any code written in a .NET supported language such as VB.NET, C# or Eiffel for .NET automatically compiles to the Common Intermediary Language (CIL) code. Through this standard, independent modules are created (.dll’s or .exe’s) that are fully interoperable so that a developer can reuse any code without having to rewrite or port it to another language.
What UML tools do we support?
EiffelStudio is capable of generating XMI (XML Metadata Interchange) information for any Eiffel system. The XMI notation makes it possible to exchange system information between any products which support this standard (e.g., IBM’s Rational Rose).
How do you create a web service in Eiffel?
Creating a web service using Eiffel for .NET is as simple as creating one in any other .NET supported language. The class that contains the methods you wish to expose on the Internet can inherit from the .NET type System.Web.Services.WebService. To expose class features on the Internet they must then be given custom attributes declaring them as web methods.
Is Eiffel good for Agile Programming?
Modern software projects need agility: the ability to react quickly to market demands, to develop successful systems incrementally, and to empower the teams. Eiffel is the agile solution par excellence: the language and environment provide the technology to produce regular release through short iterations; the method yields architectures that are easy to change, fulfilling the agile dream of “welcoming change”; and all of the Eiffel tools are focused on letting team members exert the best of their creativity and get rids of the impediments of older technologies.