RFR: CSR - JDK-8203428 Predicate::not
brian.goetz at oracle.com
Fri May 18 18:08:42 UTC 2018
We did discover that default methods on FIs combined with subtyping of
FIs caused trouble. But static methods are fine.
If we're going to do Xxx.of(...), we should do it uniformly across FIs,
not just for Predicate. I think this is a reasonable move, but we don't
have to do it right now. (The benefit is mostly that we pick up
inference of the type parameters.)
On 5/18/2018 1:54 PM, Paul Sandoz wrote:
>> On May 18, 2018, at 9:35 AM, Jim Laskey <james.laskey at oracle.com> wrote:
>> Introduce a new static method Predicate::not which will allow developers to negate predicate lambdas trivially.
>> csr: https://bugs.openjdk.java.net/browse/JDK-8203428
> +1 thank you for taking action on this.
> Predicate not captures the majority use case very concisely and clearly.
> I am reluctant to go for an alternative or companion Predicate.of, and would need to think carefully about that idiom and it's application on other functional interfaces (perhaps we went too far adding such default methods to these interfaces…).
More information about the core-libs-dev