Is V? what we need ?
brian.goetz at oracle.com
Wed May 1 13:24:42 UTC 2019
> a box is a necessary evil, everybody want to write an ArrayList<int> but we are not there yet, so we provide just the right abstraction to deal with value type in generics, not more.
I think this is where we part ways. In Java 1.0, with respect to primitives, a box was a necessary evil, because ints are not Objects. In Q-world, when we thought we couldn’t get away with values being Object, we thought it was a necessary evil again. L-world taught us we don’t need boxes, and that’s a huge weight lifted off our shoulders!
Boxes are messy; if they are necessary, we can live with them, but if they are not, why would we want to?
There are two paths here:
- Cripple values exactly as much as primitives are crippled, and everyone is on an even footing;
- Make values what we want everything to be, and catch up later with primitives to the extent we can.
But, you’re not making your case, you’re just saying “I think it should be the other way.” Make the case why the proposed new way is worse!
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the valhalla-spec-experts