Future of primitive specialization (generics) and null-restriction

- liangchenblue at gmail.com
Mon May 22 15:43:15 UTC 2023


Hello,
Since we have null-restricted types now, I have a few questions about
its implications on existing primitives and expanded generics:

1. Are Integer.TYPE (int.class) primitives etc. now the same as the
null-restricted type of Integer etc. value-type wrappers?
2. Will type parameterization like List<int> be written like
List<Integer!> (null-restricted specialization), effectively
invalidating JEP 218, as the same performance can now be achieved with
value-type parameterization in VM without invasively changing the type
hierarchy assumptions of generics? (JEP 8261529 doesn't appear updated
to the current null-restriction model)

Curious,
Chen Liang



More information about the valhalla-dev mailing list