On Feb 12, 2015, at 7:27 PM, Louis Wasserman <[email protected]> wrote:
> I get that ifPresent is already available; I'm curious if you examined how 
> often there is actually an "if absent" case in practice, relative to the 
> "only do something if present" case.
> 
> If you don't have statistics,

No, since this is still somewhat new. The evaluation was more based on the 
principle when this is required it is currently rather awkward.


> I could fairly easily get statistics on Google's codebase for what usages of 
> Guava's Optional look like, in terms of how often
> 
> if (optional.isPresent()) {
>    ...
> } else {
>    ...
> }
> 
> occurs, relative to
> 
> if (optional.isPresent()) {
>   ...
> }
> // no else
> 

Please, that would be very helpful and interesting.

Thanks,
Paul.

Reply via email to