A check that in Java is unnecessary because Java's type system is sound.. in 
that area.
Sent from my BlackBerry® wireless device

-----Original Message-----
From: "Fabrizio Giudici" <fabrizio.giud...@tidalwave.it>
Sender: javaposse@googlegroups.com
Date: Tue, 11 Oct 2011 10:31:24 
To: <javaposse@googlegroups.com>; Kevin Wright<kev.lee.wri...@gmail.com>
Reply-To: javaposse@googlegroups.com
Subject: Re: [The Java Posse] Dart unveiled

On Tue, 11 Oct 2011 10:24:11 +0200, Kevin Wright  
<kev.lee.wri...@gmail.com> 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."
fabrizio.giud...@tidalwave.it
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 javaposse@googlegroups.com.
To unsubscribe from this group, send email to 
javaposse+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/javaposse?hl=en.

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

Reply via email to