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

Could we use EiffelBuild for large project or should we restrict its use for prototyping?

EiffelBuild is the ISE GUI-building graphical tool dedicated to Eiffel. I try it and I find it very user-friendly, but I'm a little bit concerned about using such a tool for a large project. The use of a GUI-building tool could be restrictive.…
Christian Lemer
  • 893
  • 9
  • 15
2
votes
1 answer

"Using" or "import" clause in eiffel text

Is there a clause for including/using/import other classes, or maybe that's the Add Library part in EiffelStudio? If so, how would you do it in a text editor based environment?
kobi7
  • 969
  • 1
  • 7
  • 15
2
votes
2 answers

how to retreive the value of a custom header into a WSF_REQUEST

I'm looking how to get a custom header value from a received WSF_REQUEST. I read the docs quickly and didn't find the answer. 'Authorization': 'Bearer my_long_token'
Pipo
  • 4,653
  • 38
  • 47
2
votes
1 answer

Where evaluate invariants after and before call a routine?

In the design by contracts, the class invariant must be satisfied on two occasions: after creating the object and after call a routine. Are there any examples or conditions, which I have to do the evaluation before the call to the routine too?
Tomas Ramirez Sarduy
  • 17,294
  • 8
  • 69
  • 85
2
votes
1 answer

How to initialise an array of objects in Eiffel?

I am trying to implement a solution to the Producer-Consumer problem using Eiffel. I have an array p of class PRODUCER and an array c of class CONSUMER declared and initialized as following: local p : attached ARRAY[PRODUCER] c : attached…
Divya
  • 21
  • 1
  • 4
2
votes
1 answer

Eiffel: how do I create and use an UTIL class, or "call static method from class"

as my post describes it, I'd like to create an UTIL class with a never_both function. class UTIL create default_create feature -- could be in class BOOLEAN double_implies, reversible_implies, never_both (a, b: BOOLEAN): BOOLEAN …
Pipo
  • 4,653
  • 38
  • 47
2
votes
1 answer

How can I turn a big chunk of native code into a scalable service?

Greetings, I have a large piece of software developed in Eiffel. It is possible to use this code from C++, but it loads Eiffel runtime, and I can't trust the Eiffel code and runtime to be thread safe, when accessed by multiple threads from C++ I…
mahonya
  • 9,247
  • 7
  • 39
  • 68
2
votes
1 answer

Does Eiffel avoid ALL nulls?

I am actually using C# - but the question of Nulls came up on a local developers group (Chester Devs, UK) social site about the issues with nulls An object Person has a property, say Name, of type String If the name is not known then in C# Name is…
2
votes
1 answer

Passing type argument to Eiffel method

I would like to write a cast method in Eiffel which takes 'the type to cast to' as a type parameter. Is there a way to pass a type into a method in Eiffel. The only alternative I can think of is to create a new class for the conversion. Something…
Rouan van Dalen
  • 748
  • 4
  • 14
2
votes
2 answers

How to traverse a directory in eiffel?

Simple How can I get a list of the files that are inside directory using eiffel?
elviejo79
  • 4,592
  • 2
  • 32
  • 35
2
votes
2 answers

How to format a DOUBLE to print only two decimals in Eiffel?

In eiffel how do you make it so that the number. 118.1999999999999 prints to: 118.20 In other language is simply a matter of printf but there seems no to be a way to do that easily in Eiffel.
elviejo79
  • 4,592
  • 2
  • 32
  • 35
2
votes
1 answer

Class attributes in Eiffel

I am trying to make a class in Eiffel, consisting of a few attributes and functions. I keep getting issues with the attributes not being either visible to setName or not being initialised correctly. The compiler error is: VEVI: Variable is not…
cadebe
  • 651
  • 1
  • 12
  • 35
2
votes
1 answer

Exception throwing performance with deep stacks

Talking about garbage collected languages in general: Will performance in term of cpu cycles decrease when an exception is thrown the deeper the call stack is? So if an exception is thrown in the same function that catches it, would it basically be…
Serve Laurijssen
  • 9,266
  • 5
  • 45
  • 98
2
votes
1 answer

Which Eiffel compilers use Earley parsing

I stumbled upon this post http://compilers.iecc.com/comparch/article/02-04-096 that says there are two Eiffel compilers using Earley parsing. The post is quite old. I wonder if anyone here knows which Eiffel compilers use Earley parsers and if they…
Wickoo
  • 6,745
  • 5
  • 32
  • 45
2
votes
1 answer

Binary tree in Eiffel

I am trying to create a program to create a binary tree using recursive methods, but I'm having a problem. In my class MYNODE, I'm including us left and right, however they can be null (Void). Here is the code, could someone help me? class …
1
2
3
19 20