Loose ends: Optional
forax at univ-mlv.fr
Mon Jun 10 03:20:08 PDT 2013
On 06/07/2013 09:47 PM, Brian Goetz wrote:
> So, here are the decisions I see from this list:
> - Given map/flatMap, must we / do we also need ofNullable and orNull?
If you want flatMap, my answer is yes.
> - If the mapper returns null, should we continue to silently convert
> to empty optional or throw NPE?
We should throw an exception, as Optional.of() does.
> - Does renaming ifPresent to forEach help or hurt?
> What about implementing Iterable?
It hurts too.
More information about the lambda-libs-spec-observers