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

Brian Goetz brian.goetz at oracle.com
Mon Jan 5 01:29:17 UTC 2015


> Thinking about the negatives, a lot relate to primitive types always
> causing problems in code today (typically framework code). With 8
> special cases today, its managable. With an entire world of special
> cases, its not. Of course the plan is to make them not special cases,
> but what I'm seeing so far is making the bifurcation bigger not
> smaller (worse not better).

It is making it bigger, but also *more regular*.  The problem today is 
not simply that primitives are different from references, but that you 
get exactly eight, no more, no less.  Boxing is ad-hoc.  No methods.  No 
interfaces.  No generics.

I think the better way to look at it is not going from "eight special 
cases to infinitely many", but going from "one general case and eight 
special cases to two general cases."




More information about the valhalla-dev mailing list