Printed: Dec 31, 2025
From: http://jcp.org/en/jsr/detail?id=14
|
| Specification Leads | |||
| Alex Buckley | Oracle | ||
| Expert Group | |||
| Borland Software Corporation | Marx, Stefan | Odersky, Martin | |
| Oracle | Software AG | Sun Microsystems, Inc. | |
| Trifork | |||
Updates to the Original Java Specification Request (JSR)
The following updates have been made to the original JSR.
2010.02.15:
Maintenance Lead: Alex Buckley
E-Mail Address: alex.buckley
Telephone Number: +1 408 276 3065
2006.11.02:
Maintenance Lead: Danny Coward
E-Mail Address: danny.coward
Telephone Number: +1 408 276 7049
Fax Number: +1 408 276 7700
It is intended that this JSR will be delivered as part of the J2SETM "Tiger" release.
Identification | Request | Contributions
Section 1: Identification
| Submitting Participant: | Sun Microsystems |
| Name of Contact Person: | |
| E-Mail Address: | |
| Telephone Number: | |
| Fax Number: |
Section 2: Request
| 2.1 Please describe the proposed Specification: |
| A specification for extending the Java programming language with generic types. Ultimately, the Java Language Specification should be revised to integrate the proposed changes. The proposed specification will include language changes. If necessary, it may contain class file format changes needed to implement it. These would require Java Virtual Machine* Specification updates as well. |
| 2.2 What is the target Java platform? (i.e., desktop, server, personal, embedded, card, etc.) |
| All platforms |
| 2.3 What need of the Java community will be addressed by the proposed specification? |
| Many programs and libraries written in the Java (tm) programming language are intrinsically generic. However, the Java programming language lacks the ability to specify generic types. As a result, programs are unnecessarily hard to read and maintain, and are more likely to fail with runtime type errors. This feature is one of the most frequently requested language extensions on the JDC (no. 7 on the bug parade - no. 2 among language extensions). |
| 2.4 Why isn't this need met by existing specifications? |
| This can only be addressed at the language level, i.e., by the Java Language Specification. |
| 2.5 Please give a short description of the underlying technology or technologies: |
| We propose to extend the Java programming language
with notions of genericity based on parametric polymorphism.
These are well established constructs for genericity that have been used by numerous other programming languages, and received extensive theoretical study. The resulting system must meet all of the following constraints C1) Upward compatibility with existing code. Pre-existing
code must work on the new system. This implies not only upward compatibility
of the class file format, but also interoperability of old applications
with parameterized versions of pre-existing libraries, in particular those
used in the platform library and in standard extensions.
The system also has additional goals. Goals are different from constraints. Whereas all constraints must be met, it may not be possible to meet all the goals. Goals may be traded off against each other, or may be abandoned because they contradict constraints. No priority is implied by the ordering of the goals. Goals for the system include G1) Good collections support. The core Collections
APIs and similar APIs are
It is explicitly not required that the system a) Provide downward binary compatibility: It is
not necessary that class
|
| 2.6 Is there a proposed package name for the API Specification? (i.e., javapi.something, org.something, com.something, etc.) |
| No |
| 2.7 Does the proposed specification have any dependencies on specific operating systems, CPUs, or I/O devices that you know of? |
| No |
| 2.8 Are there any security issues that cannot be addressed by the current security model? |
| No |
| 2.9 Are there any internationalization or localization issues? |
| Trivial. Some error messages might need to be issued in different languages. |
| 2.10 Are there any existing specifications that might be rendered obsolete, deprecated, or in need of revision as a result of this work? |
| Revisions will be needed, primarily the JLS. Possibly, there may be effects on the JVMS. Optionally, any number of API specifications should be revised to reflect their generic type signatures. Certainly this would include the Collection API in the core platform. |
Section 3: Contributions
| 3.1 Please list any existing documents, specifications, or implementations that describe the technology. Please include links to the documents if they are publicly available. |
| The GJ specification, as well as a tutorial and
a research paper describing and motivating the design, are all available
at http://www.cs.bell-labs.com/who/wadler/pizza/gj/.
The GJ compiler implements the GJ specification, and may be downloaded
at the same website.
A candidate revision of the Collection API has been implemented as part of the GJ implementation. The Nextgen proposal is upward compatible with
GJ. It differs primarily in that it provides run time support for generic
types in exchange for weaker compatibility properties. See:
The PolyJ system was developed at MIT. For documentation and an implementation, see http://www.pmg.lcs.mit.edu/polyj/. |
| 3.2 Explanation of how these items might be used as a starting point for the work. |
| The specifications listed above could be used as a basis for the public draft. Where they fall short of stated goals or constraints, further work will be needed to determine the best course of action. |