Wildcards -- Models 4 and 5

Brian Goetz brian.goetz at oracle.com
Mon May 30 23:45:43 UTC 2016


> And I even dare ask this: can we maybe retire at least some of the raw 
> types legacy somehow?
> I can't say I've explored that direction in any real depth, but maybe 
> someone else did?
>

I don't think this would get us very far, because we're stepping back 
into the same situation that gave rise to raw types in the first place: 
the desire for gradual compatible migration to anyfied generics.  In 
fact, we now have three transition modes:

  - (existing) non-generic to erased-generic
  - (new) erased-generic to any-generic
  - (new) non-generic to any-generic

Taking the last case, if you go from "class Foo" to "class Foo<any T>", 
you still want gradual migration compatibility for clients and 
subclasses.  Which means some sort of "raw type" is needed, so we have a 
way to interpret occurrences of "Foo" in clients and subclasses after 
Foo has been any-generified.




More information about the valhalla-spec-observers mailing list