Abstract
This paper suggests virtual types for Java, a language mechanism which subsumes parameterized classes, while also integrating more naturally with Java's object model. The same basic mechanism is also known as virtual patterns in Beta and as generics in Ada95. We discuss various issues in the Java type system, issues with inheritance and genericity in general, and give a specific suggestion as to how virtual types should be integrated into Java. Finally we describe how to make an efficient implementation of virtual types based only upon the existing Java virtual machine.
Preview
Unable to display preview. Download preview PDF.
References
Agesen, O. Design and implementation of Pep, a Java just-in-time translator. To appear.
Agesen, O., and Hölzle, U. Type feedback vs. concrete type inference: A comparison of optimization techniques for object-oriented languages. In Proceedings of OOPSLA'95 (1995), ACM Press, pp. 91–107.
Apple Computer, Eastern Research and Technology. Dylan: An object-oriented dynamic language, 1st ed. Cambridge, MA, April 1992.
Canning, P., Cook, W., Hill, W., and Olthoff, W. F-bounded qualification for object-oriented programming. In ACM Conference on Functional Programming and Computer Architecture (1989), ACM Press.
Canning, P., Cook, W., Hill, W., and Olthoff, W. Interfaces for strongly-typed object-oriented programming. In Proceedings of OOPSLA'89 (1989), SIGPLAN, ACM Press.
Dahl, O. J., and Nygaard, K. Simula, an algol-based simulation language. Communications of the ACM 9, 9 (1966), 671–678.
Electronic Communities. The E Whitepaper. from http://www.communities.com/e, 1996.
Ellis, M. A., and Stroustrup, B. The Annotated C++ Reference Manual. Addison-Wesley, 1990.
Gamma, E., Helm, R., Johnson, R., and Vlissides, J. Design Patterns: Abstraction and Reuse of Object-Oriented Designs. Addison-Wesley, 1994.
Goldberg, A., and Robson, D. Smalltalk-80 — The Language. Addison-Wesley, 1989.
Gosling, J., Joy, B., and Steele, G. The Java Language Specification. Addison-Wesley, 1996.
JavaSoft. Inner Classes in Java 1.1. from http://www.javasoft.com, 1996.
Kiczales, G., de Rivières, J., and Bobrow, D. G. The Art of the Meta Object Protocol. MIT Press, 1991.
Kristensen, B. B., Madsen, O. L., MØller-Pedersen, B., and Nygaard, K. Abstraction mechanisms in the Beta programming language. In Proceedings of POPL'83 (Austin, TX, 1983).
Liskov, B., Snyder, A., Atkinson, R., and SchafFert, C. Abstraction Mechanisms in CLU. Communications of the ACM 20, 8 (August 1977).
Madsen, O. L. Open issues in object-oriented programming-a scandinavian perspective. Software-Practice and Experience 25, S4 (December 1995).
Madsen, O. L., Magnusson, B., and MØller-Pedersen, B. Strong typing of object-oriented languages revisited. In Proceedings of OOPSLA'90 (Ottawa, Canada, 1990), SIGPLAN, ACM Press.
Madsen, O. L., and MØller-Pedersen, B. Virtual classes: A powerful mechanism in object-oriented programming. In Proceedings of OOPSLA'89 (1989), SIGPLAN, ACM Press.
Madsen, O. L., MØller-Pedersen, B., and Nygaard, K. Object-Oriented Programming in theBetaProgramming Language. Addison-Wesley, 1993.
Meyer, B. Genericity versus Inheritance. In Proceedings of OOPSLA'86 (1986).
Meyer, B. Object-Oriented Software Construction. Prentice Hall International Series in Computer Science. Prentice Hall, Englewood Cliffs, NJ, 1988.
Myers, A., Bank, J., and Liskov, B. Parameterized types for Java. In Proceedings of POPL'97 (1997).
Naroff, S. Personal communication. 1993–1996.
NeXT Computer, Inc.Object Oriented Programming and the Objective C Language. Redwood City, CA, April 1993.
Odersky, M., and Wadler, P. Pizza into Java: Translating theory into practice. In Proceedings of POPL'97 (Paris, 1997), ACM Press.
Omohundro, S. The Sather Programming Language. Dr. Dobb's Journal 18, 11 (October 1993).
Palsberg, J., and Schwartsbach, M. I. Object-Oriented Type Systems. Addison-Wesley, 1993.
Schwartsbach, M. I. Object-oriented type systems: Principles and applications, from http://www.daimi.aau.dk/~mis, 1996.
Seidewitz, E. Genericity Versus Inheritance Reconsidered: Self-Reference Using Generices. In Proceedings of OOPSLA'94 (1994).
Shang, D. Are cows animals? Object Currents 1, 1 (January 1996). http://www.sigs.com/objectcurrents/.
Ungar, D., Smith, R. B., Chambers, C. and Hölzle, U. Object, message and performance: How they coexist in SELF. IEEE Computer 25, 10 (October 1992).
Zdonik, S., and Maier, D. Readings in Object Oriented Databases. Morgan Kaufmann, 1990, ch. 1: Fundamentals of Object-Oriented Databases, pp. 1–32.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1997 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Thorup, K.K. (1997). Genericity in java with virtual types. In: Akşit, M., Matsuoka, S. (eds) ECOOP'97 — Object-Oriented Programming. ECOOP 1997. Lecture Notes in Computer Science, vol 1241. Springer, Berlin, Heidelberg. https://doi.org/10.1007/BFb0053390
Download citation
DOI: https://doi.org/10.1007/BFb0053390
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-63089-0
Online ISBN: 978-3-540-69127-3
eBook Packages: Springer Book Archive