Instructors' Guide


Introduction Terminology Expressions Control Objects Inheritance Technology Summary

Type expressions -- conformance

Value expressions

Assignment


slide: Eiffel -- type expressions

Expressions

Eiffel is a strongly typed language. In Eiffel, variables must be explicitly typed by means of a declaration involving type expressions. Type expressions range over basic types (such as Boolean and Integer), formal type parameters of generic types (as the T in Array[T], which stands for the type of the elements of the array), class types (that are defined by the user) and anchored types, for instance like current (which results in the type of the current object, or self in Smalltalk terminology). Anchored types present some problems for the type safety of Eiffel programs. See section self-reference for a discussion.

In  [Meyer88] conformance rules are specified which are used to determine whether a given type is a subtype of another type. See section subtypes for an extensive discussion of the subtyping relationship.

Value expressions in Eiffel comprise the familiar arithmetical and comparison operations, as well as the message expressions of the form o.m(...) that result in the evaluation of the method m by the object o. Parameter passing in Eiffel is positional. See slide eiffel-expr.