On Tue, 11 Oct 2011 10:24:11 +0200, Kevin Wright <[email protected]> wrote:

- All generics are contravariant by design.  Want to use a
Collection<Double> as a Collection<Object> then try and add a String? With
dart you can! A great tribute to ArrayStoreException, because now you can
get the equivalent failure everywhere, in all your types...

True. But if you make them covariant, there's the wildcard thing. Can somebody please explain me whether is it possible to have covariant generics *without* all the corner cases that are often bashed in Java? Also, if I understand your point, we have anyway a runtime check (ArrayStoreException) that in Java is currently unfeasible because generics arent' reified. Right?

--
Fabrizio Giudici - Java Architect, Project Manager
Tidalwave s.a.s. - "We make Java work. Everywhere."
[email protected]
http://tidalwave.it - http://fabriziogiudici.it

--
You received this message because you are subscribed to the Google Groups "The Java 
Posse" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/javaposse?hl=en.

Reply via email to