Fwd: more background to List<int> specializing List<Any>

Gavin King gavin at hibernate.org
Mon Jan 5 00:58:27 UTC 2015


On Mon, Jan 5, 2015 at 12:00 AM, Stephen Colebourne
<scolebourne at joda.org> wrote:

> Should we take that to indicate that if value types were taken out of
> the picture, and the only goal was to handle the existing 8 primitive
> types, that there might be a potentially simpler solution - one where
> List<int> could be a sub-type of List<Integer> without boxing?

Stephen, List<int> can't be a List<Integer>. (Integer is the type
int|null, essentially.)

You mean List<int> would be a List<? extends Integer>, right?


--
Gavin King
gavin at ceylon-lang.org
http://profiles.google.com/gavin.king
http://ceylon-lang.org
http://hibernate.org
http://seamframework.org


More information about the valhalla-dev mailing list