Simplifying reified generics with partial specialization
gavin at hibernate.org
Mon Jan 5 19:52:34 UTC 2015
On Mon, Jan 5, 2015 at 1:10 PM, Ron Pressler <ron at paralleluniverse.co> wrote:
> This would mean that ArrayList<int> will implement List<Integer> (and will
> therefore extend List and List<?>)
Ron I think this would be a bad idea. Yes, I know that Java
unfortunately doesn't provide a typesafe null value, but I still think
that it would be a bad idea to have occurrences of "int" which
actually mean int|null. I think there's a really strong precedent in
the language that ints can't be null.
OTOH, perhaps it would be viable to make ArrayList<int> a subtype of
ArrayList<? extends Integer>.
More information about the valhalla-dev