ABSTRACT
The most serious impediment to writing substantial programs in the Java™ programming language is the lack of a gentricity mechanism for abstracting classes and methods with respect to type. During the past two years, several research groups have developed Java extensions that support various forms of genericity, but none has succeeded in accommodating general type parameterization (akin to Java arrays) while retaining compatibility with the existing. Java Virtual Machine. In this paper, we explain how to support general type parameterization---including both non-variant and covariant subtyping---on top of the existing Java Virtual Machine at the cost of a larger code footprint and the forwarding of some method calls involving parameterized classes and methods. Our language extension is forward and backward compatible with the Java 1.2 language and run-time environment: programs in the extended language will run on existing Java 1.2 virtual machines (relying only on the unparameterized Java core libraries) and all existing Java 1.2 programs have the same binary representation and semantics (behavior) in the extended language.
- AFM97.Ole Agesen, Stephen Freund, and John Mitcllell. Adding parameterized types to Java. In A CM ,5'ymposiu'm of Object-Oriented Progrclrnming: Systems. l,<~.nguafle.s, and Applications. October 1997. Google ScholarDigital Library
- BOSW98.Gilad Bracha, Martin Odersky. David Stoutamire. and Philip Wadler. Making the future safe for the past: Adding Genericity to the JavaTM Programming Language. To appear in Proc. of the A CM Conf. on Object-Oriented Programming, Systems, Languages, and Applications. October 1998. Google ScholarDigital Library
- CCH+89.Peter Canning, William Cook, Walter Hill. Walter Olthoff. and John C. Mitchell. F-bounded polymorphism for object-oriented programming. In Proc. Functional Programming Languages and Computer Architecture, September 1989. 273-280. Google ScholarDigital Library
- Mey92.Bertrand Meyer. Eiffel: The Language. Prentice Hall. 1992. Google ScholarDigital Library
- MBL97.Andrew C. Myers; Joseph A. Bank. and Barbara Liskov. Parameterized types for Java. In A CM Symposium on Principles of Programming Languages, January 1997. 132-145. Google ScholarDigital Library
- OW97.Martin Odersky and Philip Wadler. Pizza into Java: Translating theory into practice. In A CM Symposium on Principles of Programming Languages. January 1997. 146-159. Google ScholarDigital Library
- Tho97.Kresten Krab Thorup. Genericity in Java with virtual types. In European Conference on Object- Oriented Programming, LNCS 1241: Springer-Verlag, 1997. 444-471.Google ScholarCross Ref
- Tor98.Mads Torgersen. Virtual types are statically safe. Fifth Workshop on Foundations of Object-Oriented Languages. January 1998.Google Scholar
Index Terms
- Compatible genericity with run-time types for the Java programming language
Recommendations
Compatible genericity with run-time types for the Java programming language
The most serious impediment to writing substantial programs in the Java™ programming language is the lack of a gentricity mechanism for abstracting classes and methods with respect to type. During the past two years, several research groups have ...
The case for run-time types in generic Java
PPPJ '02/IRE '02: Proceedings of the inaugural conference on the Principles and Practice of programming, 2002 and Proceedings of the second workshop on Intermediate representation engineering for virtual machines, 2002Since the advent of the Java Programming Language in 1995, many thoughtful proposals have been made for adding generic types to the Java programming language. Generic types are a glaring omission from the existing language, forcing programmers to use ...
Comments