Unformatted text preview:

EiffelHello World in EiffelEiffelRatingEiffel Mohammed Aslam CIS 24 Assignment 02 Date: 03/31/03Bertrand Meyer created the Eiffel programming language in 1985. His company, Interactive Software Engineering (ISE) of Goleta, CA, developed it. First compiler was presented in April 1986 and customer deliveries were made in December 1986. Eiffel achieved its commercial success in 1987. Eiffel was named after the famous engineer Gustav Eiffel, who designed the Eiffel Tower in Paris. The developers compared themselves to the well-built structure of the Tower. There is a quote about the language, “The Eiffel Tower was completed on time and within budget, which should happen if you use Eiffel for you software projects”. Eiffel is a pure object-oriented language, which means that methods can only be accessed by objects and not as stand-alone logical entities. This is in sharp contrast to the popular but complex object-oriented language C++ that allows a mixture of object-oriented and procedural programming in the same application. C++ is called a hybrid language. As a pure object-oriented language, the class in Eiffel is the basic logical unit of encapsulation as well as the basic physical unit, a module. Eiffel software is organized as a set of interrelated and cooperating classes. Some features of the language is briefly discussed below: Portable: This language is available for many major industry platforms, such as windows, OS/2, Linux, UNIX, and VMS. Open System: Any coding that must be “ close to the machine” is done in C. Eiffel provides a straightforward interface to the C and C++ routines which makes possible reuse of code. Melting Ice Technology: It combines compilation with byte code interpretation for faster turnaround after change.Multiple Inheritance: A class can inherit from as many parents as necessary. There are no limitations as in Java where a class can inherit from only one parent. A class can also inherit from other classes through two or more parents, which is also considered as repeated inheritance. Statically Typed: Errors are detected at compile time not during runtime, which also increases its efficiency. Dynamically Bound: The language guarantees that the right version of an operation will always be applied depending on the target object. Overloading operators/methods: It allows operator overloading but not method overloading. Lexical Simplicity: Eiffel is not case-sensitive. Both keywords and identifiers can be written in any combination of upper and lower case. The tokens MaKe and make and MAKE all refer to the same identifier. Coding style 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. Eiffel has only six basic executable statements – assignment, object creation, method call conditional, iteration and choice (case). Among the object-oriented languages, Eiffel does not permit storing into member variables of other objects. The assignment statement can only change the value of a member variable of the current object, or a local variable of the current method. All changes to other objects must be accomplished by calls to methods of that object. Direct access to member variables of other objects is "read only" in Eiffel.The iteration (loop) statement in Eiffel is unusual in that it does not provide a field or clause, which will step the loop. The programmer must explicitly code the appropriate stepping statement within 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 another unusual aspect of Eiffel: there is no special syntax for accessing elements of an array. An array is simply an instance of the class ARRAY, and access is made through ordinary method calls. Some Eiffel compilers provide specialized optimizations for array access. Eiffel's procedural coding is strictly structured. There are no Eiffel statements for terminating a loop early, or for exiting a method early Sample code: Hello World in Eiffel class HELLO_WORLD creation make feature make is do io.putstring ("Hello World!") io.new_line end end --class HELLO_WORLD Despite of its pure object-orientation and excellent reputation among those who are familiar with the language Eiffel has failed to gain much interest from soft ware developers. The reasons for this lack of interest are unclear, and are a topic of frequent discussion within the Eiffel community.Attributes Eiffel Rating Invention 1985 N/A Syntax Easy to understand 8 Clarity of code Clear 9 Libraries Yes 6 Size Abstraction Yes 7 Binding Dynamic Binding 8 Inheritance Multiple and repeated 10 Polymorphism Yes 7 Portability Yes 9 Reusability Yes 8 Encapsulation Yes 8 Exception handling Application Telecommunication Systems, Teaching purposes, Rapid Prototyping, Financial Applications.Bibliography Wiener, Richard S. An Object-Oriented Introduction to Computer Science using Eiffel, Prentice Hall PTR, upper Saddle River, New Jersey, 1996 Maughan, Glenn Windows Programming Made Easy, using Object, Prentice Hall PTR, upper Saddle River, New Jersey, 2001 The Eiffel Home Page: <http://www.eiffel.com/general/> The Eiffel international consortium:


View Full Document

CUNY CISC 3160 - Lecture Notes

Download Lecture Notes
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Lecture Notes and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Lecture Notes 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?