Design patterns: elements of reusable object-oriented software
Design patterns: elements of reusable object-oriented software
Adding type parameterization to the Java language
Proceedings of the 12th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications
Making the future safe for the past: adding genericity to the Java programming language
Proceedings of the 13th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications
Compatible genericity with run-time types for the Java programming language
Proceedings of the 13th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications
Featherweight Java: a minimal core calculus for Java and GJ
Proceedings of the 14th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications
The Java Language Specification
The Java Language Specification
Efficient Implementation of Run-time Generic Types for Java
Proceedings of the IFIP TC2/WG2.1 Working Conference on Generic Programming
A first-class approach to genericity
OOPSLA '03 Proceedings of the 18th annual ACM SIGPLAN conference on Object-oriented programing, systems, languages, and applications
Generics in Java and C++: a comparative model
ACM SIGPLAN Notices
Safe instantiation in generic Java
Proceedings of the 3rd international symposium on Principles and practice of programming in Java
Safe instantiation in generic Java
Science of Computer Programming - Special issue: Principles and practices of programming in Java (PPPJ 2004)
Efficient first-class generics on stock Java virtual machines
Proceedings of the 2006 ACM symposium on Applied computing
The Java 5 generics compromise orthogonality to keep compatibility
Journal of Systems and Software
A Design for Type-Directed Programming in Java
Electronic Notes in Theoretical Computer Science (ENTCS)
Harmonizing classes, functions, tuples, and type parameters in virgil iii
Proceedings of the 34th ACM SIGPLAN conference on Programming language design and implementation
Hi-index | 0.00 |
Since 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 permissive, non-parametric type signatures for fields and methods of "naturally generic" classes (such as java.util.Vector) and repeatedly cast the results of operations on these classes to the more specific types. The JSR14 extension of Java proposed by Sun Microsystems (based on GJ) addresses this problem by adding generic types to the language, but prohibits operations that depend on run-time generic type information. This prohibition relegates generic types to "second-class" status where they are invisible at run-time, which is inconsistent with the status of types including parametric arrray types in the existing language. We have implemented a generalization of JSR14 called NextGen that supports the same syntactic extensions of Java of JSR14 yet eliminates the prohibition on operations that depend on run-time generic type information. In NextGen. generic types are "first-class": they can be used in excactly the same contexts as conventional types. The implementation of NextGen compiler is derived from the same prototype GJ compiler as the JSR14 compiler and shares most of its desirable properties including a high degree of compatibility with legacy code. In this paper, we show through of a series of programming examples that first-class generic types play an important role in writing clean generic code.