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
2
votes
4 answers

Why isn't Eiffel's automatic type conversion feature more popular?

What happened to me while programming in Java: String str // want to call something(), but signature does not match something(Foo foo) // but I have this conversion function Foo fooFrom(String) // Obviously I am about to create another method…
Cwt
  • 8,206
  • 3
  • 32
  • 27
2
votes
3 answers

How do you develop webapps in Eiffel?

How do you develop a web application in Eiffel? Is there a webapp framework for eiffel? Are there examples of web apps developed with eiffel?
elviejo79
  • 4,592
  • 2
  • 32
  • 35
2
votes
1 answer

Why using the equality sign in an assignment of a constant?

I have a question concerning constants in eiffel. Well it's just a semantic issue but it has been bugging me for some time now and I just don't understand the concept of this speciality. For a normal assignment you use := which makes total sense in…
Lukas Häfliger
  • 526
  • 4
  • 17
2
votes
1 answer

Accessing local variable from inline agent

I am trying to implement does_key_exist, I thought the code below would do it. But I get a compilation error key not found line: Result := not (x.key = key) does_key_exist(key: attached STRING):BOOLEAN do Result := not…
ctrl-alt-delor
  • 7,506
  • 5
  • 40
  • 52
1
vote
1 answer

EiffelStudio, project read-only: cannot compile

I'm making a shared project with my university in Eiffel. I've just downloaded the project and I've got this problem: We have to work on a NameProject_as_library.ecf, so we have to work on an as_library type. The problem is here, that's doesn't…
camillo_benso
  • 107
  • 2
  • 2
  • 7
1
vote
1 answer

why here 'or' follows with an 'else', what kind of branches do they make?

I saw a really confusing statement when I read OMOHUNDRO's article about balltree construction algorithms: --... if pq.empty or else btm.bvol <= pq.top.bvol then done:=true --... I don't know how could an 'else' follows 'or' and there is empty…
SZYoo
  • 147
  • 7
1
vote
1 answer

How to use convert for creation

Using "Void safety - complete", my code: class TENSOR_SHAPE create default_create, from_tuple convert from_tuple ({TUPLE [INTEGER]}) feature -- Initialization from_tuple (a_shape: TUPLE [INTEGER]) ... I try to call this with: …
jjj
  • 23
  • 8
1
vote
2 answers

How to print unicode to console in Eiffel?

Evidently in python: print u'\u0420\u043e\u0441\u0441\u0438\u044f' outputs: Россия How do I do this in Eiffel?
jjj
  • 23
  • 8
1
vote
1 answer

EiffelStudio finalize with contracts enabled

How to produce the Finalized executable with contract checking enabled? It is possible to keep the check statements intact, but can we keep all the pre/postconditions and class invariants? I need this for testing a computationally expensive…
Ilgiz Mustafin
  • 414
  • 1
  • 4
  • 15
1
vote
1 answer

Implementing a common attribute in recursive data type like TREE

When implementing a recursive data structure like TREE, I need a common attribute per TREE, and I wonder how to implement it: Adding the attribute to a TREE node, replicates the attribute for every node, not once per TREE Using a once attribute, I…
U. Windl
  • 3,480
  • 26
  • 54
1
vote
1 answer

Exit program in Eiffel

Is there a way in Eiffel to exit a program, possible with a defined exit code like exit in C? In my case I would like to just end the program like exit(0) would do.
Ilgiz Mustafin
  • 414
  • 1
  • 4
  • 15
1
vote
2 answers

referencing typed element of tuple

Discovering late (used to define classes instead) TUPLES and looking through the documentation I was wondering if there is a mechanism to get the right type of a given TUPLE. The goal is both anchoring its types and avoid having to test its type…
Pipo
  • 4,653
  • 38
  • 47
1
vote
1 answer

How to inherit from HASH_TABLE in Eiffel?

I want to make a derived class of HASH_TABLE which implements a few additional features. I tried implementing it like this: class HASH_TABLE2[G->HASHABLE] inherit HASH_TABLE[G,G] rename make as make_2 end create …
Miklos
  • 101
  • 2
  • 11
1
vote
0 answers

How to compile using EiffelStudio? VD43 Precompiled file is missing or unreadable (...)/driver.exe - External C compilation failed

After installing EiffelStudio I can't compile and run any project because I always get VD43 warning and C Compiler Error. 2 VD43 Precompiled file is missing or unreadable. File 'c:\users\username\documents\eiffel user…
Miklos
  • 101
  • 2
  • 11
1
vote
1 answer

How to enable debug into estudio

I tried to enable the debug syntax into estudio without afording it. In this case it is from a library and it doesnt enter into the debug io.put_string ("any debug statement here") end What's wrong with my configuration?
Pipo
  • 4,653
  • 38
  • 47
1 2
3
19 20