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.
Preview
Unable to display preview. Download preview PDF.
References
R.M. Amadio and L. Cardelli. Subtyping recursive types. ACM Transactions on Programming Languages and Systems, 15(4), 1993.
G. Booch. Object-Oriented Analysis and Design with Applications. The Benjamin/Cummings Publishing Company, Inc, 1994.
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.
W.R. Cook. A proposal for making eiffel type-safe. The Computer Journal, 32(4), 1989.
P. Johnson and C. Rees. Reusability through fine-grain inheritance. Software-Pratice and Experience, 22(12), December 1992.
G. Lakoff. Women, Fire and Dangerous Things: What Categories Reveal About the Mind. The University of Chicago Press, 1987.
G. Lakoff and M. Johnson. Metaphors We Live By. The University of Chicago Press, 1980.
B. Meyer. Eiffel, the Language. Prentice Hall, 1992.
B. Meyer. Beware of polymorphic catcalls. Personal research note, http://www.eiffel.com/doc/manuals/technology/typing/cat.html, 1995.
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.
J. Palsberg and M.I. Schwartzbach. Object-Oriented Type Systems. John Wiley & Sons, 1994.
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.
H. Pedersen. Extending ordinary inheritance schemes to include generalization. In OOPSLA '89 conference proceedings, ACM SIGPLAN Notices, 1989.
J. Rumbaugh. Dishinerited! examples of misuse of inheritance. Journal of Object-Oriented Programming, 5, February 1993.
J. Rumbaugh, M. Blaha, W. Premerlani, F. Eddy, and W. Lorenson. Object-Oriented Modeling and Design. Prentice Hall, 1991.
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.
Author information
Authors and Affiliations
Editor information
Rights 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