Skip to main content

Metaphoric polymorphism: Taking code reuse one step further

  • Conference paper
  • First Online:
ECOOP ’96 — Object-Oriented Programming (ECOOP 1996)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 1098))

Included in the following conference series:

  • 154 Accesses

Abstract

We propose two new constructs for object oriented programming that significantly increase polymorphism. Consequently, code may be reused in ways unaccounted for by existing machinery. These constructs of type correspondence and partial inheritance are motivated from metaphors of natural language and thought. They establish correspondences between types non of which is (necessarily) a subtype of the other. As a result, methods may operate on objects — and may receive arguments — of types different than the ones originally intended for. The semantics of the proposed constructs generalizes that of ordinary inheritance, thereby establishing the latter as a special case. We show that the incorporation of these constructs in programming supports the process of natural software evolution and contributes to a better conceptual organization of the type system.

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

Access this chapter

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. R.M. Amadio and L. Cardelli. Subtyping recursive types. ACM Transactions on Programming Languages and Systems, 15(4), 1993.

    Google Scholar 

  2. G. Booch. Object-Oriented Analysis and Design with Applications. The Benjamin/Cummings Publishing Company, Inc, 1994.

    Google Scholar 

  3. E.R. Cook, W.L Hill, and P.S. Canning. Inheritance is not subtyping. In C.A. Gunter and J.C Mitchell, editors, Theoretical Aspects of Object-Oriented Programming. The MIT Press, 1994.

    Google Scholar 

  4. W.R. Cook. A proposal for making eiffel type-safe. The Computer Journal, 32(4), 1989.

    Google Scholar 

  5. P. Johnson and C. Rees. Reusability through fine-grain inheritance. Software-Pratice and Experience, 22(12), December 1992.

    Google Scholar 

  6. G. Lakoff. Women, Fire and Dangerous Things: What Categories Reveal About the Mind. The University of Chicago Press, 1987.

    Google Scholar 

  7. G. Lakoff and M. Johnson. Metaphors We Live By. The University of Chicago Press, 1980.

    Google Scholar 

  8. B. Meyer. Eiffel, the Language. Prentice Hall, 1992.

    Google Scholar 

  9. B. Meyer. Beware of polymorphic catcalls. Personal research note, http://www.eiffel.com/doc/manuals/technology/typing/cat.html, 1995.

    Google Scholar 

  10. R. Mitchell, J. Howse, and I. Maung. As-a: a relationship to support code reuse. Journal of Object-Oriented Programming, 8(4), July/August 1995.

    Google Scholar 

  11. J. Palsberg and M.I. Schwartzbach. Object-Oriented Type Systems. John Wiley & Sons, 1994.

    Google Scholar 

  12. J. Palsberg and M.I. Schwartzbach. Type substitution for object oriented programming. In OOPSLA/ECOOP '90 conference proceedings, ACM SIGPLAN Notices, Volume 25, Number 10, October 1990.

    Google Scholar 

  13. H. Pedersen. Extending ordinary inheritance schemes to include generalization. In OOPSLA '89 conference proceedings, ACM SIGPLAN Notices, 1989.

    Google Scholar 

  14. J. Rumbaugh. Dishinerited! examples of misuse of inheritance. Journal of Object-Oriented Programming, 5, February 1993.

    Google Scholar 

  15. J. Rumbaugh, M. Blaha, W. Premerlani, F. Eddy, and W. Lorenson. Object-Oriented Modeling and Design. Prentice Hall, 1991.

    Google Scholar 

  16. R. Stata and J. Guttag. Modular reasoning in th presence of subclassing. In OOPSLA '95 conference proceedings, ACM SIGPLAN Notices, Volume 30, Number 10, October 1995.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Pierre Cointe

Rights and permissions

Reprints and permissions

Copyright information

© 1996 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Rinat, R., Magidor, M. (1996). Metaphoric polymorphism: Taking code reuse one step further. In: Cointe, P. (eds) ECOOP ’96 — Object-Oriented Programming. ECOOP 1996. Lecture Notes in Computer Science, vol 1098. Springer, Berlin, Heidelberg. https://doi.org/10.1007/BFb0053073

Download citation

  • DOI: https://doi.org/10.1007/BFb0053073

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-61439-5

  • Online ISBN: 978-3-540-68570-8

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics