Review request for initial lambda functions and utils
cgdecker at gmail.com
Tue Aug 9 09:55:09 PDT 2011
I'm curious about cases such as Predicates.IS_NULL and Predicates.isNull()
where there is both a public constant of type Predicate<Object> and a public
method that returns Predicate<T>. For one thing, I find the existence of
both fields and methods for these standard functions kind of awkward,
particularly when there's both a field and a method for the same thing. For
another, is it really a good idea to provide a method returning a
Predicate<Object> as a Predicate<T>? I realize there are many people who
don't really get wildcards, but should the standard libraries cater to
methods declared to take Predicate<T> where they should take Predicate<?
super T>? Or is there some other reason for this?
On Mon, Aug 8, 2011 at 11:02 PM, Mike Duigou <mike.duigou at oracle.com> wrote:
> Late last week I committed an initial version of the proposed standard
> basic lambda functions and some utils for those functions to the OpenJDK
> lambda repository. The implementation (especially the oh-so-tedious-javadoc
> and unit tests) is still very rough but we are interested in hearing
> feedback. For now focus your feedback on:
> - approach
> - Is there a different way to solve the problem?
> - completeness
> - What *must* be there that is missing?
> - stylistic/usage issues
> - Copying inputs vs to not copy inputs--see Predicates.contains() vs.
> Predicates.or(Predicate<T>... )
> - surprising behaviour
> - self-inconsistency or surprising behaviour with respect to other Java
> - usage problems
> - I can't use this to X
> This API will see incremental progress in the next couple of weeks. Over
> time other useful bits such as extension methods for Collection, List, Set
> utilizing lambda functions will also appear.
More information about the lambda-dev