Parameterized Types and Java
Javasche Bank, Andrew C. Myers · DSpace@MIT (Massachusetts Institute of Technology) · 1996
Java offers the real possibility that most programs can be written in a type-safe language. However, for Java to be broadly useful, it needs additional expressive power. This paper extends Java in one area where more power is needed: support for parametric polymorphism, which allows the definition and implementation of generic abstractions. The paper discusses both the rationale for our design decisions and the impact of the extension on other parts of Java, including arrays and the class library. It also describes an implementation of the mechanism, including extensions to the Java virtual machine, and designs for the bytecode verifier and interpreter. The bytecode interpreter has been implemented; it provides good performance for parameterized code in both execution speed and code size, and does not slow down programs that do not use parameterized code. 1 Introduction Java [Sun95a] is an interesting programming language because of its potential for WWW applications. It is additional...