JEP 218: Generics over Primitive Types
Simon Ochsenreither
simon at ochsenreither.de
Mon Oct 27 05:19:11 UTC 2014
Hi!
> - If T is a value type, then we collapse wildcards to an invariant T.
Ok, thanks for the clarification. This seems to be exactly what I
described earlier.
What I'm wondering: For primitive types–e. g. int–it's fairly obvious
how to decide whether a user wants variance (by using the reference
type, Integer) or a better representation (int), but what's the story
here for value types?
E. g. is it possible/how would on express: I have an Vector of Value
Type, but I want the value Type to be boxed to use the variance of Vector?
Thanks,
Simon
More information about the valhalla-dev
mailing list