hg: lambda/lambda/jdk: Update initial lambda APIs and tests to use new syntax.
Colin Decker
cgdecker at gmail.com
Mon Sep 12 08:28:37 PDT 2011
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? If it weren't safe, it wouldn't be safe to cast
Predicate<Object>s to Predicate<T> as you later advocate.
> - some methods return a Predicate<Object> instead of a
> Predicate<T> so it will not work if the predicate is used by example
> in a ?:
>
It isn't a bug for the methods to return the actual type of the predicate
and I don't recall having seen any valid arguments in the last discussion as
to why they should return Predicate<T>.
More information about the lambda-dev
mailing list