Question about improvement on reified generics

Brian Goetz brian.goetz at oracle.com
Fri Oct 27 16:25:04 UTC 2017


Thinking of Valhalla as being about "reification" is likely to take you 
down the wrong path.  We don't view erasure as a "bug" that needs to be 
"fixed" (despite how superficially attractive this sort of thinking is.)

The most likely place where we land is that value instantiations are 
specialized (so that the layout may be specialized), and reference 
instantiations will remain erased.  (All references have the same 
layout, so layout specialization is not needed.)


On 10/27/2017 11:29 AM, Marcus Manning wrote:
> Hello Valhalla-Dev,
>
> I have a question to the the improvement of reified generics in java. 
> I read about it by [1]
> If I understand it correctly, class<value type> will be reified, but 
> not class<reference type>, right? But then, on page 31 of [1] 
> something like a reified String is captured and String is a reference 
> type? After all, will class<reference type> become a reified type?
>
> Best regards,
>
> Marcus
>




More information about the valhalla-dev mailing list