> De: "Brian Goetz" <brian.go...@oracle.com>
> À: "Remi Forax" <fo...@univ-mlv.fr>
> Cc: "valhalla-spec-experts" <valhalla-spec-experts@openjdk.java.net>
> Envoyé: Mercredi 1 Mai 2019 15:24:42
> Objet: Re: Is V? what we need ?

>> 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!

As i said, it's not cripling value type, the underlying semantics of L and Q is 
the same, it's finding the right semantics for representing nullable value 
type, something we don't want to appear in the signature of methods, so it's 
crippling nullable vlue type but until we have fully reified generics, at that 
point nobody will care about nullable value type anymore. 

Rémi 

Reply via email to