Type expressions -- conformance
- basic types -- Boolean, Integer
- formal parameter types -- Array[T], List[T]
- class types -- user-defined
- anchored types -- like current
- arithmetic, comparison, method evaluation --
slide: Eiffel -- type expressions
Eiffel is a strongly typed language.
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 , which stands for the
type of the elements of the array),
(that are defined by the user)
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.
[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
that result in the evaluation of the method m
by the object o.
Parameter passing in Eiffel