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

Brian Goetz brian.goetz at oracle.com
Sun Jan 4 18:40:40 UTC 2015


> I know our focus in this current phase is on "Layers", but would like to
> educate myself further about the general background of issues with Any.

Let me correct slightly.  We're investigating "layers" or "conditional 
methods" not because this is the feature we went looking for, but 
because it is a possible and believed-practical answer to the more 
general question of "what generic type system can provide us the gradual 
migration compatibility we are looking for."

This is not unlike what happened in 8; we didn't do default methods 
because we wanted multiple inheritance of behavior; we did it because we 
needed *interface evolution*, and of the dozen or so possible ways to 
get there that we evaluated, this one had the best combination of 
characteristics.

So far we've gotten feedback that people don't like the balance of "user 
model weight" and "general utility" for layers (feedback received loud 
and clear, no need to reopen this.)


More generally, I think there's a lot of tendency to assume here that 
these writeups constitute *decisions*, which they do not.  These 
writeups are snapshots of where our head is at this week, which we 
provide so people can get a peek about what we're thinking about.  But 
we're a long way from the end of this road.



More information about the valhalla-dev mailing list