MultiJava: Modular Open Classes and Symmetric Multiple Dispatch for Java

Saved in:
Bibliographic Details
Title: MultiJava: Modular Open Classes and Symmetric Multiple Dispatch for Java
Authors: Curtis Clifton, Gary T. Leavens, Craig Chambers, Todd Millstein
Contributors: The Pennsylvania State University CiteSeerX Archives
Source: ftp://ftp.cs.iastate.edu/pub/techreports/TR00-06/TR.ps.gz
Publication Year: 2000
Collection: CiteSeerX
Subject Terms: Open classes, open objects, extensible classes, extensible external methods, external methods, multimethods, generic functions, object-oriented programming languages, single dispatch, multiple dispatch, encapsulation, modularity, static typechecking, subtyping, inheritance, Java language, MultiJava language, separate
Description: 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 novel compilation scheme that operates modularly and incurs performance overhead only where open cl.
Document Type: text
File Description: application/postscript
Language: English
Relation: http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.34.7341
Availability: http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.34.7341
Rights: Metadata may be used without restrictions as long as the oai identifier remains attached to it.
Accession Number: edsbas.80CF809
Database: BASE
Description
Abstract: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 novel compilation scheme that operates modularly and incurs performance overhead only where open cl.