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
0
votes
1 answer

How do I get agents to work in {ARRAY}.do_if in Eiffel?

I am trying to iterate an array in Eiffel. And select some elements, using do_if. What I have tried. my_method (list:ARRAY[INTEGER]) local low : ARRAYED_LIST[INTEGER] piv : INTEGER do create low.make(0) --works for…
ctrl-alt-delor
  • 7,506
  • 5
  • 40
  • 52
0
votes
1 answer

eiffel: type is based on unknown class (even when visible into libraries)

Trying to include a library I just created I'm unable to have the Class available even if it appears into the libraries on the group view of eiffel studio ../thirdparty/moon_time/sunriset_lib.ecf
Pipo
  • 4,653
  • 38
  • 47
0
votes
1 answer

eiffel: semantic of ANY default

Surprised that Default in class ANY is frozen and without implementation???, what is the semantic for this function?? Class ANY frozen default: detachable like Current -- Default value of object's type do end My intention was to…
Pipo
  • 4,653
  • 38
  • 47
0
votes
2 answers

eiffel type conformance and attachement check not working

Trying to solve one of the SCOOP consequences with make_from_separate I'm running into an issue where at runtime types seem to be the same and won't pass the attached statement. non_separate_from_any non_separate_from_any, any_from_separate (v:…
Pipo
  • 4,653
  • 38
  • 47
0
votes
1 answer

non-compatible actual argument in feature call in collection make_from_separate

Don't understand where I'm wrong here... class LINKED_LIST_SEP[G] inherit LINKED_LIST [G] create make, make_from_iterable, make_from_separate feature {NONE} -- Initialization make_from_separate (other: separate like…
Pipo
  • 4,653
  • 38
  • 47
0
votes
1 answer

The class inherits two different generic derivations of the same class

What is the proper way of precising the type of an iterable through inheritence. as inherit FOO[like babar] is not alowed FOO class FOO inherit ITERABLE[detachable ANY] -- I know garbage but for DB_RESULT its the case feature -- Access …
Pipo
  • 4,653
  • 38
  • 47
0
votes
0 answers

non-compatible actual argument in feature call with generic separate arguments. A way to use anchored type?

As far as I understand, separate does not conform to non separate non separate conforms to separate so, that's the reason the compiler complains when I say like Current, when the P and S I specified into the RELATIONSHIP class are non separate Is…
Pipo
  • 4,653
  • 38
  • 47
0
votes
1 answer

Is it possible to make a create which returns a boolean

hi i dont know if i asked the question clearly. i have a deferred class "animal" which contains two features : "bite" (this returns a boolean -> bite:BOOLEAN) and "speak"(speak(word:BOOLEAN)). now i made a class named "dog" what inherit from…
du7ri
  • 312
  • 2
  • 12
0
votes
1 answer

estudio does not check `require` when it should?

Eiffel Studio seems to pass through my requirements even if I have them enabled on project settings. And as far as I remember I was able some time to put a break point into the requirements... I don't understand what I'am missing here, as you can…
Pipo
  • 4,653
  • 38
  • 47
0
votes
1 answer

Two different configuration files share the same UUID. In configuration

Don't understand this message and neither how to fix it under estudio 19.12 Warning code: VD80 Configuration warning Two different configuration files share the same UUID. In configuration: …
Pipo
  • 4,653
  • 38
  • 47
0
votes
1 answer

Eiffel avoiding duplicates into ecf file

I have duplicate classes into a used library. How can I specify on the ecf file that I want to exclude a path? Error code: VD71 Configuration error Duplicate class:…
Pipo
  • 4,653
  • 38
  • 47
0
votes
1 answer

Passing anonymous object of derived class to a routine in Eiffel

Assuming that we have: class A ... class B inherit A ... f (a_a: A) ... Then, can you write something like the following pseudocode, without using a temporary variable? -- `y` is an argument to B's constructor. f (create B.make(y))
Eleno
  • 2,864
  • 3
  • 33
  • 39
0
votes
2 answers

Sharing a type with a generic class?

How do you declare a variable to be the same type as a type parameter used to instantiate a generic class? The following code does not compile: class TEST [G, H -> INTEGER] feature f (i: INDEXABLE [G, H]) local y: H …
Eleno
  • 2,864
  • 3
  • 33
  • 39
0
votes
0 answers

Eiffel failure on OS X - Eiffel cannot find library

I use macOS Catalina, and installed EiffelStudio per instructions on the EiffelStudio install page. When I executed estudio on the command line, I got this error $ estudio dyld: Library not loaded: /opt/local/lib/libgthread-2.0.0.dylib Referenced…
user3161399
  • 253
  • 2
  • 6
0
votes
1 answer

Eiffel separate object into ensure statement

Is there a way to have a separate object to be checked as ensure with the separate obj as l_obj statement? I guess having a boolean function should work. Any reason for that I don't understand? set_position (a_pos: like position) do …
Pipo
  • 4,653
  • 38
  • 47