Streams

Doug Lea dl at cs.oswego.edu
Fri Sep 14 05:36:35 PDT 2012


On 09/14/12 08:30, Remi Forax wrote:

> There is in my opinion a better design,
>    x = s.findFirst(valueIfEmpty);
>
> the default value is a parameter of the current function

Yes, sorry not to have listed this option. I like it too.
Some people hate it so much that I don't think it will be
adopted though :-) At least when applied in cases like:
  x. = max(Long.MIN_VALUE);

-Doug



More information about the lambda-libs-spec-experts mailing list