Review request for initial lambda functions and utils
Mike Duigou
mike.duigou at oracle.com
Fri Aug 12 11:57:47 PDT 2011
On Aug 10 2011, at 16:02 , Stephen Colebourne wrote:
> Some thoughts.
>
> - I don't like using the term "map", or even "mapper" because of the
> prior meaning of Map (ie. a hash map) in Java. I would prefer to see
> Transformer.
>
> - I would prefer to see all Javadoc specify whether a parameter/return
> can take or return null. eg:
> * @param second an additional Block which will be chained after
> this Block, may be null
> * @return a Block which performs in sequence the {@code apply} method of
> * this Block and the {@code apply} method of the specified Block
> operation, not null
I'd agree except that based upon type null is never a reasonable value. Instead I'd rather we be conscientious about not defining any APIs involving the lambda functions where null is a permitted value.
> - Formatting of the lambdas is pretty horrible for readability.
It's shocking how dependant one becomes upon the IDE for source reformating. I'm currently forced to do all formatting manually for "Java 8" source. I have cleaned up some of the cases.
> Note that this point leads to the syntax discussion (because -> at the
> end of the line is just crazy).
I agree. The libs use whatever evolving syntax is supported by the compiler. Don't take that usage as any endorsement but certainly feel free to use the libs as examples in other discussions of the syntax.
[screed against "->" syntax omitted]
Mike
More information about the lambda-dev
mailing list