Convenience Collector forms
Joe Bowbeer
joe.bowbeer at gmail.com
Tue Apr 9 15:03:42 PDT 2013
I didn't understand that these were proposed for the Collectors tools
class. I don't see a problem with that either.
On Tue, Apr 9, 2013 at 6:27 AM, Tim Peierls <tim at peierls.net> wrote:
> On Mon, Apr 8, 2013 at 10:32 PM, Joe Bowbeer <joe.bowbeer at gmail.com>wrote:
>
>> Q: Why is the method on the block called counting() instead of the
>> proposed count()?
>>
>
> I like the adverbial form because it reads more like English.
>
>
> Except for possibly count(), I'm not liking any of these, because:
>>
>> 1. There is already enough exposed "reduce" surface area in max/min/sum.
>>
>> 2. map/reduce is where it's at. It's easier for me to read code that
>> uses those familiar forms than it is to familiarize myself with a bunch of
>> new convenience methods.
>>
>> I don't think these new forms are going to make Collectors easier to
>> learn, or collectors code easier to read (except at a very superficial
>> level).
>>
>
> I think there are many folks for whom these convenience Collectors will
> make the difference between ignoring and using streams. As long as they're
> bundled as static factory methods in a Collectors class, I don't see the
> problem.
>
> --tim
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/lambda-libs-spec-experts/attachments/20130409/4eda6516/attachment-0001.html
More information about the lambda-libs-spec-experts
mailing list