Craig Chambers

Modular, Statically Typed Multimethods in Dubious

Multimethods offer increased expressiveness and flexibility over conventional singly dispatched object-oriented languages, supporting for instance easy and independent extensibility of both data types (classes) and operations (multiply dispatched generic functions). However, previous multimethod-based languages either were dynamically typed, or broke the symmetry of multiple dispatching, or required global program knowledge when typechecking.

To study this problem, we developed a new core language, named Dubious, which is based on a classless object model, first-class generic functions, symmetric multiple dispatching, and a simple module system. We then developed a family of three static type systems for Dubious, representing different tradeoffs between simplicity and expressiveness. All three type systems allow each module to be typechecked separately, while still guaranteeing that new type errors will not arise when independently developed modules are combined in a single program.

September 15, 1999
Wean 8220