Loose ends: Optional

Brian Goetz brian.goetz at oracle.com
Tue May 28 13:22:49 PDT 2013


>> Having methods like filter or map defined on Optional with a different semantics as the ones of Stream
>> will just introduce doubt and confusion, so it doesn't worth it.
> 
> The implementation decides if something can be lazy, I'm ok with these having the same methods. In fact, I suggest we change the name of isPresent to forEach.

I'm OK with this.  Its a little weird since there is at most one element to each, but the connection to methods on other containers is nice.




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