Compatible genericity with run-time types for the Java programming language
- 1 October 1998
- journal article
- Published by Association for Computing Machinery (ACM) in ACM SIGPLAN Notices
- Vol. 33 (10) , 201-215
- https://doi.org/10.1145/286942.286958
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.Keywords
This publication has 6 references indexed in Scilit:
- Making the future safe for the pastPublished by Association for Computing Machinery (ACM) ,1998
- Adding type parameterization to the Java languagePublished by Association for Computing Machinery (ACM) ,1997
- Genericity in java with virtual typesPublished by Springer Nature ,1997
- Pizza into JavaPublished by Association for Computing Machinery (ACM) ,1997
- Parameterized types for JavaPublished by Association for Computing Machinery (ACM) ,1997
- F-bounded polymorphism for object-oriented programmingPublished by Association for Computing Machinery (ACM) ,1989