United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-4888066 : add typesafe arrays, arrays of generic types

Details
Type:
Enhancement
Submit Date:
2003-07-09
Status:
Closed
Updated Date:
2006-12-06
Project Name:
JDK
Resolved Date:
2006-12-06
Component:
specification
OS:
solaris_8,windows_xp
Sub-Component:
language
CPU:
generic,x86
Priority:
P4
Resolution:
Not an Issue
Affected Versions:
5.0
Fixed Versions:

Related Reports
Relates:

Sub Tasks

Description
See 4856545 (add variance to the generic type system) for background.

We would like to have typesafe versions of arrays, in which store
checks cannot fail.  This would allow arrays to be used with generic
types.  Without typesafe arrays, arrays of generic types are not allowed.
This is necessary for type soundness: because generics are implemented
using erasure, the VM cannot fully check array stores.

See also http://www.daimi.au.dk/~plesner/variance/

Other alterative syntaxes are worth considering, for example

	Array<T>

and the wildcard syntax for covariant (readonly) typesafe
arrays.

                                    

Comments
EVALUATION

We may look at typesafe arrays in the future, but reifying generics is likely to be a higher priority.
                                     
2006-12-06
EVALUATION

Some day, perhaps, but not now.

###@###.### 2003-08-22
                                     
2003-08-22



Hardware and Software, Engineered to Work Together