Is V? what we need ?

Remi Forax forax at univ-mlv.fr
Wed May 1 12:57:40 UTC 2019


Brian ask me to make it its own thread.
so is V? what we need, because i believe we have been a little over our own head on this and loose the sight of what we need for V?.

we need V?
- to represent the L variation of a Q type.
- to interact with generics that are not reified.

V? does that but does far more, V? is a super type of V which is dangerous, because people will use it as parameter of function instead of V because it's a super type and works with null.
Here we are back to a world were every value types may be null. 

I believe that the issue is that V? should work as a box and currently V? is to powerful/useful as a box so people will start to use it as a true type.
- V? should not be a supertype of V
- you should not be able to call methods or fields on V? (constructor are still allowed), again it should be a box, so the automatic conversions from/to V/V? are fine, but not more.

the moto for V? should be works like an Integer (not more).

Rémi


More information about the valhalla-spec-experts mailing list