hg: lambda/lambda/jdk: Update initial lambda APIs and tests to use new syntax.
Neal Gafter
neal at gafter.com
Mon Sep 12 09:19:18 PDT 2011
On Mon, Sep 12, 2011 at 8:28 AM, Colin Decker <cgdecker at gmail.com> wrote:
> On Sun, Sep 11, 2011 at 7:52 AM, Rémi Forax <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).
More information about the lambda-dev
mailing list