Round 2 feedback

Brian Goetz brian.goetz at
Wed Feb 13 08:06:11 PST 2013

>> Map<String, Long> totalByCityForEveryCity =
>> ->
>> totalByCity.optionalGet(city).orElse(0L));
> This is similar in effect to a "left outer join" in SQL.  There are lots
> of good reasons to be able to do this, so that data is regular, and
> algorithms are plagued with missing data checks.   Being able to provide
> the default value, instead of "nul" is very nice.

In which case a more appropriate place to put this support is in the 
joiningWith Collector, not Map.

More information about the lambda-dev mailing list