MultiJava
Curtis Charles Clifton, Gary T. Leavens, Craig Chambers et al. · ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA) · 2000
We present MultiJava, a backward-compatible extension to Java supporting open classes and symmetric multiple dispatch. Open classes allow one to add to the set of methods that an existing class supports without creating distinct subclasses or editing existing code. Unlike the "Visitor" design pattern, open classes do not require advance planning, and open classes preserve the ability to add new subclasses modularly and safely. Multiple dispatch offers several well-known advantages over the single dispatching of conventional object-oriented languages, including a simple solution to some kinds of "binary method" problems. MultiJava's multiple dispatch retains Java's existing class-based encapsulation properties. We adapt previous theoretical work to allow compilation units to be statically typechecked modularly and safely, ruling out any link-time or run-time type errors. We also present a n compilation scheme that operates modularly and incurs performance overhead only where open classes or multiple dispatching are actually used.
Cited by 285 works. doi:10.1145/353171.353181 Open-access PDF
Authors
References
- Design Patterns: Elements of Reusable Object-Oriented Software
- The Java Language Specification
- The Java Programming Language
- Aspect-Oriented Programming
- Common LISP: the language (2nd ed.)
- A semantics of multiple inheritance
- The Java programming language (2nd ed.)
- Pizza into Java
- Java Language Specification, Second Edition: The Java Series
- Object-oriented multi-methods in Cecil