Clifton, Curtis, Leavens, Gary T., Chambers, Craig and Millstein, Todd (2000) MultiJava: Modular Symmetric Multiple Dispatch and Extensible Classes for Java. Technical Report TR00-06, Department of Computer Science, Iowa State University.
MultiJava: Modular Symmetric Multiple Dispatch
and Extensible Classes for Java
Curtis Clifton, Gary T. Leavens, Craig Chambers, and Todd Millstein
Multiple dispatch offers several well-known advantages over the single
dispatching of conventional object-oriented languages, including a
simple solution to the "binary method" problem and cleaner
implementations of the "strategy" and similar design patterns.
Extensible classes allow one to extend the set of methods that an
existing class supports without editing that class or client
code. This provides, among other idioms, a simple implementation of
the "visitor" design pattern. We present MultiJava, a
backward-compatible extension to Java supporting symmetric multiple
dispatch and extensible classes. We adapt previous theoretical work
to allow MultiJava classes to be statically typechecked modularly and
safely, ruling out any link-time or run-time type errors. We also
present a novel compilation scheme that operates modularly and incurs
performance overhead only where multiple dispatching or extensible
classes are actually used.
Keywords: Multimethods, generic functions, object-oriented programming
languages, single dispatch, multiple dispatch, encapsulation,
modularity, static typechecking, subtyping, inheritance, open objects,
extensible classes, external methods, Java language, MultiJava
language, separate compilation.
1999 CR Categories:
D.1.5 [Programming Techniques] Object-oriented programming;
D.3.2 [Programming Languages] Language Classifications ---
D.3.3 [Programming Languages] Language Constructs and Features ---
abstract data types, classes and objects,
control structures, inheritance, modules, packages, patterns,
procedures, functions, and subroutines;
D.3.4 [Programming Languages] Processors --- compilers;
D.3.m [Programming Languages] Miscellaneous ---
multimethods, generic functions.
Copyright (c) 2000 by Curtis Clifton, Gary T. Leavens,
Craig Chambers, and Todd Millstein
Contact site administrator at: email@example.com