Idea how to implement VT/VO compatibility in JVM
Maurizio Cimadamore
maurizio.cimadamore at oracle.com
Thu Jan 22 13:21:19 UTC 2015
On 22/01/15 13:11, Stéphane Épardaud wrote:
> `ArrayList<int>` is special, mostly due to the fact that I'm not sure
> we can retrofit `Integer` to be a value type, so existing primitives
> may not get the `List<int> === List<Integer>` that I suggest for value
> types (though I'd be very interested in making this work).
Sorry - didn't want fold two problems into one - let's keep things
simple and think about:
Object o = new ArrayList<Point>();
where Point is a value class.
Now,
o instanceof ArrayList<Point> //?
Or, as translated by our current prototype:
o instanceof ArrayList${0=QPoint;} //yes!
But how about:
o instanceof ArrayList<?> //?
Maurizio
More information about the valhalla-dev
mailing list