Affiliation:
1. Rice University
2. Sun Microsystems Laboratories
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.
Publisher
Association for Computing Machinery (ACM)
Subject
Computer Graphics and Computer-Aided Design,Software
Cited by
14 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献
1. TASTyTruffle: Just-in-Time Specialization of Parametric Polymorphism;Proceedings of the ACM on Programming Languages;2023-10-16
2. Specializing generic Java data structures;Proceedings of the 18th ACM SIGPLAN International Conference on Managed Programming Languages and Runtimes;2021-09-29
3. Contextual dispatch for function specialization;Proceedings of the ACM on Programming Languages;2020-11-13
4. Lightweight, flexible object-oriented generics;ACM SIGPLAN Notices;2015-08-07
5. Miniboxing;ACM SIGPLAN Notices;2013-11-12