Question on layer/peeling

John Rose john.r.rose at oracle.com
Tue Jan 6 20:52:09 UTC 2015


On Jan 6, 2015, at 12:39 AM, Michael Barker <mikeb01 at gmail.com> wrote:
> 
> Could allowing primitives to implement interfaces like Comparable make the following implementations be possible, such that the JIT could generate specialisations for the primitive types?
> 
> public class Arrays
> {
>     public <any T extends Comparable> void sort(T[] array)
>     {
>         // ... implement sort
>     }

In short, yes.  — John




More information about the valhalla-dev mailing list