Abstract

Multi-methods (collections of overloaded methods associated to the same message, whose selection takes place dynamically instead of statically as in standard overloading) are a useful mechanism since they unleash the power of dynamic binding in object-oriented languages, so enhancing re-usability and separation of responsibilities. However, many mainstream languages, such as, e.g., Java, do not provide it, resorting to only static overloading.In this paper we propose an extension, we call FMJ (Featherweight Multi Java), of Featherweight Java with encapsulated multi-methods thus providing dynamic overloading. The extension is conservative and type safe: both message-not-understood and message-ambiguous are statically ruled out. Our core language can be used as the formal basis for an actual implementation of dynamic overloading in Java-like languages.

Full Text
Paper version not known

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.