type safety

blog Type safe Eiffel (4, chapters "Generic constraints based on conformance" and "Validation with local analysis" included)

From the beginning of Eiffel the language has been characterized as strongly typed. But since its beginning there has been a hole in the type system which has not yet been fixed up to now (the so called catcall problem).


What is the hole?

The existence of the hole can be demonstrated with very simple examples.

blog Type safe Eiffel (4, chapters "Backward compatibility" and "Promiscuous generic conformance" included)

From the beginning of Eiffel the language has been characterized as strongly typed. But since its beginning there has been a hole in the type system which has not yet been fixed up to now (the so called catcall problem).


What is the hole?

The existence of the hole can be demonstrated with very simple examples.

blog Why Type-safety?

schoelle's picture

The search for a type-safe version of Eiffel is a never-ending story in the development of the Eiffel language. Recently, Helmuth Brandl has created a series of blog entries with a nice description of is needed to make Eiffel type-safe. There have been others posting blog entries (including me) and it also had been a constant topic during the ECMA process of Eiffel standardization.

Interestingly, a question that was seldom raised was: why do we need type-safety? As absurd as it seems for all the mathematicians to raise this question, the Eiffel community has understood for a long time that mathematical soundness is not a reason in itself. Instead, it serves a purpose in the enterprise of language design: giving software developers means to express themselves in ways that reduce the number of defects in his/her programs and enable him/her to master complex problems he/she would not be able to master without.

blog Type safe Eiffel (3, chapter "Covariance" included)

From the beginning of Eiffel the language has been characterized as strongly typed. But since its beginning there has been a hole in the type system which has not yet been fixed up to now (the so called catcall problem).


What is the hole?

The existence of the hole can be demonstrated with very simple examples.

blog Type safe Eiffel (2, chapter "Feature rich ANY" included)

From the beginning of Eiffel the language has been characterized as strongly typed. But since its beginning there has been a hole in the type system which has not yet been fixed up to now (the so called catcall problem).


What is the hole?

The existence of the hole can be demonstrated with very simple examples.

blog Type safe Eiffel (1)

From the beginning of Eiffel the language has been characterized as strongly typed. But since its beginning there has been a hole in the type system which has not yet been fixed up to now (the so called catcall problem).


What is the hole?

The existence of the hole can be demonstrated with very simple examples.

blog Type safe Eiffel

The following is a short description of a solution to the catcall problem (recently posted in comp.lang.eiffel as well):


In Eiffel it is easy to generate runtime type errors. Therefore Eiffel cannot (yet) be considered to be a typesafe language.

blog Vision for a modern Eiffel

Main features of Eiffel

The main features of Eiffel are:

- clean object orientation with multiple inheritance

- design by contract

- elegant expressive syntax

- automatic memory management

- generics

- uniform type system with type safety (exept catcalls)


These features were unique at the time Eiffel was invented (some 25 years ago).

blog catcall -- a solution

Eiffel in its current form is not completely type safe. Type errors (called catcalls in Eiffel speak) are possible. The compiler cannot detect these type errors. They usually trigger an exception at runtime.

These type errors are possible due to covariant redefinition of arguments and polymorphy. Both principles are very powerful in OO programming.

article

Fun with Generics

Intro

We all know about generics as a wonderful help to implement container data structures like lists, sets, bags etc. Much later than Eiffel, object-oriented programming languages like Java and C# have understood that generic parameters are a powerful extension to the type system and remove the need for many casts. So, what else can we do with generics beyond containers?

Syndicate content