A simple technique for handling multiple polymorphism
OOPLSA '86 Conference proceedings on Object-oriented programming systems, languages and applications
The Common Lisp object system: an overview
European conference on object-oriented programming on ECOOP '87
A programmer's guide to object-oriented programming in Common LISP
A programmer's guide to object-oriented programming in Common LISP
Eiffel: the language
Design patterns: elements of reusable object-oriented software
Design patterns: elements of reusable object-oriented software
Covariance and contravariance: conflict without a cause
ACM Transactions on Programming Languages and Systems (TOPLAS)
A meta-language for typed object-oriented languages
Selected papers of the thirteenth conference on Foundations of software technology and theoretical computer science
Theory and Practice of Object Systems - Special issue: type systems
Inside the C++ object model
The Dylan reference manual: the definitive guide to the new object-oriented dynamic language
The Dylan reference manual: the definitive guide to the new object-oriented dynamic language
Object-oriented programming: a unified foundation
Object-oriented programming: a unified foundation
Parasitic methods: an implementation of multi-methods for Java
Proceedings of the 12th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications
MultiJava: modular open classes and symmetric multiple dispatch for Java
OOPSLA '00 Proceedings of the 15th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications
Modern C++ design: generic programming and design patterns applied
Modern C++ design: generic programming and design patterns applied
Multi-Methods in a Statically-Typed Programming Language
ECOOP '91 Proceedings of the European Conference on Object-Oriented Programming
Multi-dispatch in the Java virtual machine: design and implementation
COOTS'01 Proceedings of the 6th conference on USENIX Conference on Object-Oriented Technologies and Systems - Volume 6
Featherweight Java with multi-methods
Proceedings of the 5th international symposium on Principles and practice of programming in Java
Featherweight Java with dynamic and static overloading
Science of Computer Programming
Hi-index | 0.00 |
Goals of flexibility and re-usability in typed object-oriented languages suggest the requirement of double dispatch, i.e., the mechanism of dynamically selecting a method not only according to the run-time type of the receiver (single dispatch), but also to the run-time type of the argument. However, many mainstream languages, such as, e.g., C++ and Java, do not provide it, resorting to only single dispatch. In this paper we present a general technique for adding double dispatch as a type-safe language feature, so yielding dynamic overloading and covariant specialization of methods, without extending basic semantics. To this aim we introduce a toy core language, extended to a full form of (non encapsulated) multi methods. Then we define a translation algorithm from multi methods to the core language, that implements double dispatch by using only standard mechanisms of static overloading and single dispatch. As a main feature, our translation preserves type safety, it uses neither RTTI nor type downcasts and does not introduce crucial overhead during method selection.