Parasitic methods: an implementation of multi-methods for Java
Proceedings of the 12th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications
Object-Oriented Multi-Methods in Cecil
ECOOP '92 Proceedings of the European Conference on Object-Oriented Programming
PolyD: a flexible dispatching framework
OOPSLA '05 Proceedings of the 20th annual ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications
Hi-index | 0.00 |
Mainstream object-oriented languages, such as C++ and Java, provide only a restricted form of polymorphic methods, namely single-receiver dispatch. In common programming situations, programmers must work-around this limitation. We detail how to extend the Java Virtual Machine to support multiple-dispatch and examine the complications that Java imposes on multiple-dispatch in practice. Our technique avoids changes to the Java programming language itself, maintains source-code and library compatibility, and isolates the performance penalty and semantic changes of multiple-dispatch to the program sections which use it. We have micro-benchmark and application-level performance results for a dynamic Most Specific Applicable (MSA) dispatcher, two table-based dispatchers (Multiple Row Displacement (MRD) and Single Receiver Projections (SRP)), and a tuned SRP dispatcher. Our general-purpose technique provides smaller dispatch latency than equivalent programmer-written double-dispatch code.