Questions tagged [eiffel]

Eiffel is a statically typed object-oriented programming language closely related with the programming method of the same name. Both are based on a set of principles like Design by Contract, Command-Query Separation, Uniform Access, etc. Many concepts initially introduced by Eiffel find their way to C#, Java and other languages. The program in Eiffel can be compiled unchanged for almost any target platform.

Background

The design goal behind the Eiffel language, libraries, and programming methods is to enable programmers to create reliable, reusable software modules. Eiffel supports multiple inheritance, genericity, polymorphism, encapsulation, type-safe conversions, and parameter covariance. Eiffel's most important contribution to software engineering is design by contract (DbC), in which assertions, preconditions, postconditions, and class invariants are employed to help ensure program correctness without sacrificing efficiency.

Eiffel's design is based on object-oriented programming theory, with only minor influence of other paradigms or concern for support of legacy code. Eiffel formally supports abstract data types. Under Eiffel's design, a software text should be able to reproduce its design documentation from the text itself, using a formalized implementation of the "Abstract Data Type". See wikipedia for more information.

Standards

The Eiffel language definition is an international standard ISO/IEC DIS 25436. The latter is identical to the version of ECMA International: Standard ECMA-367, Eiffel: Analysis, Design and Programming Language.

Key characteristics

  • An object-oriented program structure in which a class serves as the basic unit of decomposition.
  • Design by contract tightly integrated with other language constructs.
  • Automatic memory management, typically implemented by garbage collection.
  • Inheritance, including multiple inheritance, renaming, redefinition, "select", non-conforming inheritance, and other mechanisms intended to make inheritance safe.
  • Constrained and unconstrained generic programming.
  • A uniform type system handling both value and reference semantics in which all types, including basic types such as INTEGER, are class-based.
  • Static typing.
  • Void safety, or static protection against calls on null references, through the attached-types mechanism.
  • Agents, or objects that wrap computations, closely connected with closures and lambda calculus.
  • Once routines, or routines evaluated only once, for object sharing and decentralized initialization.
  • Keyword-based syntax similar to ALGOL/Pascal but separator-free, insofar as semicolons are optional, with operator syntax available for routines.
  • Case insensitivity.
  • Built-in support for concurrency using SCOOP (Simple Concurrent Object-Oriented Programming) model.

Resources

288 questions
1
vote
1 answer

How to add and remove objects from an array in Eiffel

I am trying to make a CONTAINER class that maintains an array of CRITTER objects (that I have already created and tested. Note, there are various CRITTER subspecies, that are inheriting from the CRITTER super class). The aim is to add and remove…
cadebe
  • 651
  • 1
  • 12
  • 35
1
vote
1 answer

"Unable to store the editor layout information." in Eiffel Studio

I have not really a programming issue but more like an IDE issue. My Eiffel Studio 15.01 won't start up because of this error shown on the picture in the link. https://i.stack.imgur.com/mCzrO.jpg Can anybody help please?
1
vote
1 answer

How to use Eiffel functions?

So I'm just starting to learn Eiffel. One of the first exercises in the book I'm using says to make a function that does base^exp without using ^. I've copied my code below. class APPLICATION inherit ARGUMENTS create make feature…
1
vote
1 answer

Amortized Complexity

In my Algorithms class we discussed Amortized Complexity. Unfortunately I was not able to attend due to being away on an athletic competition. After attempts to contact the professor to explain this failed, I am stuck asking it here. What is…
user3325783
1
vote
1 answer

Prove two algorithms are identical

I am supposed to show that two algorithms execute identical statements in identical order. One is a tail recursive version of the other. They are written in Eiffel. tail_rec(x:instance_type):result_type is local y:instance_type; do …
user3325783
1
vote
1 answer

Effel: EiffelVision2 changing widget style

I'm joining an Eiffel project that has a horribly outdated GUI design. The GUI is built with EiffelVision2 and the application is Windows platform only. how can I change the look/design of the widgets, like defining shape and color of scrollbars,…
genesys
  • 3,557
  • 7
  • 29
  • 25
1
vote
2 answers

How do I append to end of a file, without deleting its previous content, in eiffel

i am programming with eiffel and every time i open a file and start writing into it, it deletes its content and starts writing into it like it's an empty file, is there a way to do it without deleting the previouse content? Here is a example of…
bnaya
  • 93
  • 3
1
vote
1 answer

initializing Without Creating An Instance (Eiffel)

This is a BON Diagram on the classes. Notice how in the example, the attributes were not created into instances. At run time a uses take_off from b. I'm just wondering how take_off is being initialized in the B_747 class. In my assignment, I have…
J0natthaaann
  • 555
  • 1
  • 6
  • 11
1
vote
1 answer

How to make an Eiffel Vision2 window always on top?

I created a little Vision2 window with an animation in it. In my Windows 7 environment, I want this animation to be always visible on top all other windows on my desktop. I'm able to periodically call raise to bring the Vision2-window in front - but…
Birliban
  • 65
  • 4
1
vote
1 answer

Detachable element in ensure, Eiffel

How can I ensure that an element is in my HASH_TABLE, if it is detachable? Current = HASH_TABLE[ARRAYED_SET[G], G] add_edge (src: G; dst: G) do if attached Current.at(src) as edges then edges.put(dst) end ensure in: Current.at…
Ferenc Dajka
  • 1,052
  • 3
  • 17
  • 45
1
vote
1 answer

Access HASH_TABLE element eiffel

I have this simple code, I'd like to access an element in an ARRAYED_SET what is in a HASH_TABLE, but I get an error: Error: target of the Object_call might be void. What to do: ensure target of the call is attached. here's my…
Ferenc Dajka
  • 1,052
  • 3
  • 17
  • 45
1
vote
1 answer

Console application via network in eiffel?

Hey I'm working in project, but i cant manage to connect from a IP not located in the same network (LAN). The code bellow works fine locally, but I cant figure out how to make work from different IP located in different locations?, and google cant…
Jorge Y. C. Rodriguez
  • 3,394
  • 5
  • 38
  • 61
1
vote
1 answer

Ensure clause in Eiffel

I'm doing an assignment in Eiffel and I'm having trouble implementing my ensure clause. Is there some special syntax you need to include a variable or function? This is my code at the moment for my 'put' function put(key: K; value: V) …
user1472506
  • 13
  • 1
  • 3
1
vote
2 answers

Implementation of primitive types in Eiffel/circular definitions in library source

I am new to Eiffel and I am trying to understand how the "primitive" types (e.g, INTEGER_32, REAL_64, etc.) are implemented. I am confused by what appears to be a circular dependency in the EIFFEL libary class source files. Primitive types are…
1
vote
1 answer

What this Case Sensitivity really means?

We all know there are some case sensitive languages, as well as case insensitive. Eiffel is a case insensitive one, according to the details I found. If a language is case insensitive, that means its keywords also case insensitive, right? But, in…
PeakGen
  • 21,894
  • 86
  • 261
  • 463