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
0 answers

Why does my Cecil / Eiffel code not find the 'apply' procedure in class PROCEDURE?

I want a C routine, which is supplied with an Eiffel 'agent' to call the routine 'apply' in the class PROCEDURE. int c_nng_aio_set_procedure_target(void *item, EIF_OBJECT target) { void **pptr = (void **) (item); EIF_TYPE_ID type_id; /*…
0
votes
2 answers

Eiffel Studio ARM Apple Silicon M1

I am hoping to create some software with Eiffel & Eiffel Studio I have a Mac mini with the Apple M1 Arm Processor. Is there a port of EiffelStudio to native Mac M1? Does Eiffel Studio support native MacOS Windowing or is it still requiring Windows?
guest
  • 41
  • 1
  • 5
0
votes
1 answer

rescue how to raise further or forget an exception

How do I raise an exception further in eiffel? I have 3 cases I want to retry a_feature local l_retries_count: INTEGER do some_potential_failing_feature rescue if l_retries_count <= 3 then …
Pipo
  • 4,653
  • 38
  • 47
0
votes
1 answer

Strategy to reuse created DB_SERVICES and other instances into an EWF_APP by thread

Into my EWF_APP[EWF_APP_EXECUTION] the EWF_APP_EXECUTION inherits from WSF_FILTERED_ROUTED_EXECUTION defining setup_router. To be able to access informations globally by thread (as far as I understand the implementation also SCOOP region in this…
Pipo
  • 4,653
  • 38
  • 47
0
votes
0 answers

how could a check not been done with all assertions set to true?

Running a debug session with estudio with all assertions set to true (I checked into cluster, common target, specific target, etc.) pass over a check assertion? I also tried to remove EIFGENs and recompile the whole project.
Pipo
  • 4,653
  • 38
  • 47
0
votes
1 answer

where rescue should be called in an EWF_APP to be able to close a database connection

Inheriting from WSF_FILTERED_ROUTER_EXECUTION I redefine the clean to be able to close DB Connections. But when there is an assertion failure, I don't know where to call the clean on a rescue clause. In which feature do I have to call my clean on a…
Pipo
  • 4,653
  • 38
  • 47
0
votes
2 answers

READABLE_STRING_GENERAL vs STRING

When to use which type of STRING in eiffel? I saw using READABLE_STRING_GENERAL and having to l_readable_string.out' to convert it to STRING`
Pipo
  • 4,653
  • 38
  • 47
0
votes
1 answer

number of seconds since epoch in eiffel for a DATE_TIME object

how would you calculate the number of seconds since epoch in eiffel for a DATE_TIME object? What is the proper way to do it with the current libraries?
Pipo
  • 4,653
  • 38
  • 47
0
votes
2 answers

how would you calculate the number of seconds since epoch in eiffel for a DATE_TIME object

how would you calculate the number of seconds since epoch in eiffel for a DATE_TIME object?
Pipo
  • 4,653
  • 38
  • 47
0
votes
1 answer

Understanding Eiffel loop variant/invariant

I was trying to have a structure which talks himself about variants and invariants into Eiffel loops, but don't understand the variant part! from l_array := <<1,2,30,60>> l_index := l_array.lower invariant valid_local_index:…
Pipo
  • 4,653
  • 38
  • 47
0
votes
1 answer

What is the best way to declare a constant into a class that can be redefined

What is in eiffel the best way to have a constant which can be redefined? class A => color: STRING = "green" color B inherit A => cannot redefine while having a function which only returns "green" or "blue" needs the string to be created again,…
Pipo
  • 4,653
  • 38
  • 47
0
votes
1 answer

eiffel: cluster has two classes with the same name

How to deal with cluster has two classes with the same name with eiffel studio? when I want to choose between 2 versions? Where can I find documentation about that? Think that there is a trick with sources->renaming
Pipo
  • 4,653
  • 38
  • 47
0
votes
1 answer

eiffel: a statement for explicitly executing code when assertions are on

Sometimes the checks and contract constructions need an elaboration which wants to be avoided when assertions removed to improve performances and avoid doing useless things with the "only" work of the compiler. I refer for ex. to job in loops checks…
Pipo
  • 4,653
  • 38
  • 47
0
votes
1 answer

Eiffel redefined function can define its own assertions?

I need to know if a redefined function in Eiffel can define its own assertions.
Ruben Capote
  • 314
  • 2
  • 9
0
votes
1 answer

Clone and equal method in Eiffel

Why define a clone or equal method in Eiffel gives greater protection with respect to types problems in comparison to something similar in C#?
Ruben Capote
  • 314
  • 2
  • 9