Support reified generics

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Duplicate
    • Priority: P4
    • None
    • Affects Version/s: 8.0pe
    • Component/s: specification
    • None
    • generic
    • generic

      The Java language and Java SE should support reified generic types (aka 'true' generics)
      rather than the current scheme of type erasure. Intuitively, a programmer expects to
      be able to use a generic type wherever a non-generic type can be used. This is not
      the case with type erasure. Some advantages of reified generics are

      1. Getting rid of the unchecked warnings from javac attendant upon
      assigning objects of raw type to objects of the corresponding generic
      type and the cryptic ClassCastExceptions that can result therefrom at
      runtime.

      2. Allowing arrays of generic types and parametric cast, instanceof
      and catch operations.

      3. Allowing 'new' operations on parametric types, e.g., 'new T()'.

      4. Allowing the definition of per-instantiated-generic-type static
      fields.

            Assignee:
            Joe Darcy
            Reporter:
            Paul Hohensee
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: