Eiffel: External Dispatch
(mos's homepage)


External dispatch in object creation (RG, JOT) generalizes the object-oriented (internal) single dispatch mechanism (dynamic binding) to a (external) dynamic n‑ary dispatch mechanism (n > 0).

(Click here for a step-by-step introduction to this mechanism.)

External dispatch requires two language extensions:

This new language mechanism is statically safe, and provides an Object-Oriented modular solution to many problems:

Examples

Download

The current version of the compiler and example code can be downloaded here:

Syntax

The syntactical modifications to Eiffel are the following:

Semantics

To ensure a static safe mechanism, proper semantic rules are required. In short, it must be ensured sanity in the definition of external dispatch classes, for instance ensuring a covariant redifinition in the class formal arguments in, at least, one of the formal arguments. Also it must ensure non-conflicting descendants, a complete and unambiguous instantiation -- meaning, that it must be statically ensured that all possible combinations of dispatch objects type are dispatched to one, and only one, effective external dispatch class.

See External dispatch in object creation (also here) for a more detailed presentation of the applicable semantic rules.


(mos at ua.pt) University of Aveiro, DETI/IEETA