Is V? what we need ?

Brian Goetz brian.goetz at oracle.com
Wed May 1 13:03:42 UTC 2019


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

These are the proximate causes, but I think this undersells it.  

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

Whoa, I think you just skipped a few dozen steps … 

Perhaps you could clarify this with some examples of “I worry people will write __ instead of ___, and then __ will happen.”  

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

Again, lots to unpack here:

  - What, in your mind, is the difference between a box and an adjunction?
  - What benefits do box types give here?
  - What risks do you envision from “using V? as a true type”?  





More information about the valhalla-spec-observers mailing list