Skip to main content

Multiple Polymorphic Arguments in Single Dispatch Object Oriented Languages

  • Conference paper
Contemporary Computing (IC3 2010)

Part of the book series: Communications in Computer and Information Science ((CCIS,volume 95))

Included in the following conference series:

Abstract

Commonly used object-oriented languages like C++, Java and C# are single dispatch languages and do not support multiple polymorphic arguments in message dispatch. In this work, we demonstrate simulation of multimethods in single dispatch languages without any change in the language syntax. For realization of multimethods, we use double dispatching (dispatching on each argument in turn), message dispatching using runtime type information (RTTI) (adding multimethod dispatch routine), and reflection (using metadata). We develop a preprocessor to simulate the RTTI technique. We discuss the issues associated with code-reuse and encapsulating multimethods in single dispatch languages.

A Poster presented at IBM-IRL Collaborative Academia Research Exchange (I-CARE) Workshop, New Delhi, Oct 2009.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Chambers, C.: Object-oriented multi-methods in cecil. In: Lehrmann Madsen, O. (ed.) ECOOP 1992. LNCS, vol. 615, pp. 33–56. Springer, Heidelberg (1992)

    Chapter  Google Scholar 

  2. Ingalls, D.: Simple technique for handling multiple polymorphism. In: OOPSLA, SIGPLAN Notices, vol. 21, pp. 347–349 (1986)

    Google Scholar 

  3. Java multimethod framework, http://igm.univ-mlv.fr/~forax/works/jmmf/

  4. Kumar, R., Agrawal, V.: Multiple dispatch in reflective runtime environment. Computer Language System Structures 33(2), 60–78 (2007)

    Article  MATH  Google Scholar 

  5. Naik, M., Kumar, R.: Efficient message dispatch in object-oriented systems. ACM SIGPLAN Notices 35(3), 49–58 (2000)

    Article  Google Scholar 

  6. Stroustrup, B.: The Design and Evolution of C++. Addison Weasley, Reading (1994)

    Google Scholar 

  7. Cmm. C++ with multimethods, http://www.op59.net/cmm/

  8. Aho, A.V., Lam, M., Sethi, R., Ullman, J.D.: Compilers: Principles, Techniques and Tools. Addison Wesley, Reading (2006)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2010 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Bansal, S. (2010). Multiple Polymorphic Arguments in Single Dispatch Object Oriented Languages. In: Ranka, S., et al. Contemporary Computing. IC3 2010. Communications in Computer and Information Science, vol 95. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-14825-5_23

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-14825-5_23

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-14824-8

  • Online ISBN: 978-3-642-14825-5

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics