hg: lambda/lambda/jdk: Update initial lambda APIs and tests to use new syntax.
Rémi Forax
forax at univ-mlv.fr
Mon Sep 12 10:06:02 PDT 2011
On 09/12/2011 06:19 PM, Neal Gafter wrote:
> On Mon, Sep 12, 2011 at 8:28 AM, Colin Decker <cgdecker at gmail.com
> <mailto:cgdecker at gmail.com>> wrote:
>
> On Sun, Sep 11, 2011 at 7:52 AM, Rémi Forax <forax at univ-mlv.fr
> <mailto:forax at univ-mlv.fr>> wrote:
> >
> > - some casts are wrong, you can't cast a Predicate<? super T> to
> > a Predicate<T>, it's not safe.
> >
>
> What isn't safe about it?
>
>
> Among other things, it is wrong (in the sense that you may be casting
> something to a type that it isn't). Adding this sort of broken code
> to the JDK, and encouraging other people to write such code, will be
> an impediment to ever reifying generics in the future. (If generics
> were reified, the cast would fail).
And since we now have invokedynamic, reified generics are not far away :)
Rémi
More information about the lambda-dev
mailing list