Year: 2017
Type: article
Abstract: Although multiple dispatch properly solves difficult programming problems such as binary methods, the large majority of existing object-oriented programming languages still don't support it.The few languages that provide such a mechanism do so in ways that either lie outside an object-oriented modular construct (class), or possess some other limitations, such as arbitrarily choosing one of the dispatch object types as the repository for dispatch methods.This article presents a new objectoriented language mechanism for single and multiple dispatch.As a proof of concept, we will use Java as the base language.This mechanism is compatible with existing object-oriented language constructs, and provides a simple, expressive, and universal dispatch tool.Our proposal introduces a new object-oriented external dispatch mechanism, which complements the traditional object-oriented internal single dispatch mechanism.This new mechanism is applicable not only to multiple dispatch, but can also be used as an alternative to decorators and some creational design patterns.A more complete realization for external dispatch motivated the definition of a new singleton language mechanism that is also presented.
Source: The Journal of Object Technology
Author: Miguel Oliveira e Silva
Institution: University of Aveiro
Language: English
Subfield: Software
Field: Computer Science
Domain: Physical Sciences
Open Access status: diamond
OpenAlex ID: W2623105436
