Valhalla EG meeting notes March 28, 2018

John Rose john.r.rose at oracle.com
Sun May 13 01:48:51 UTC 2018


On May 12, 2018, at 7:42 AM, Brian Goetz <brian.goetz at oracle.com> wrote:
> 
> 
>> Specific issues with arrays and sub typing:
> 
> I’ve lost track of the current state of this; is a V[] yet a subtype of Object[], as object classes are?  
> 
> If values are to play nicely with erased generics, we have to get there.  For example:
> 
>     <T> void sort(T[] elements, Comparator<T> c) { … }
> 
> This erases to
> 
>     void sort(Object[] elements, Comparator c) { .. }
> 
> So to sort an array of V, we 

Yes, we are already there.  Using aastore on V[] makes V[] <: Object[] almost a forced move. L-world brings values into a place where we can erase them to the types we are used to, as bounds in generics 

– John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/valhalla-spec-experts/attachments/20180512/56c54aba/attachment-0001.html>


More information about the valhalla-spec-experts mailing list