Aggressive unboxing of values: status update

Brian Goetz brian.goetz at oracle.com
Tue Nov 11 08:10:49 UTC 2014


>> There is nothing wrong with having boxes. One part of the development plan is to implement a boxing operation. Did you have a look at the "Boxing and object interoperability" section of this document?
>> 
>> http://cr.openjdk.java.net/~jrose/values/values-0.html
> Yes, I'm aware of that. It's just not very helpful, because most interesting cases and issues are not covered.

That’s because we’re just getting started!  We don’t know the answers to all the questions yet.  Please be patient.  

> 
> I'm questioning the idea of
>   a) having Integer act as a value box for int,

You should be questioning this — it’s questionable. 

>   b) putting all the same requirements on value boxes;

> from my experience, trying to retrofit Integer as a value box for int is a futile endeavor, as well as weighing down other value boxes with things like reference equality etc. in the way John described in his mail.

It is quite likely that Integer will not be suitable as a box for int when all is said and done; we’re trying to be open minded and not disqualify prematurely.  




More information about the valhalla-dev mailing list