Drop Arrays.parallelStream()?

Joe Bowbeer joe.bowbeer at gmail.com
Sat Apr 20 15:16:46 PDT 2013


I agree with Mike and Tim.  I'd remove all the parallelStream() methods now
- and add some or all back later if they ARE needed.

I don't like the inconsistency of having parallelStream available on some
stream factories and not on others.




On Sat, Apr 20, 2013 at 3:10 PM, Tim Peierls <tim at peierls.net> wrote:

> On Sat, Apr 20, 2013 at 6:01 PM, Mike Duigou <mike.duigou at oracle.com>wrote:
>
>> I would probably always use always .stream().parallel() idiomatically for
>> consistency unless parallelStream() told me why I should use it instead. I
>> say toss all of the parallelStream() methods unless there's an impl
>> efficiency dependent reason to retain some of them.
>>
>
> Agreed.
>
> I see the discoverability of Collection.parallelStream() as a potential
> pedagogical drawback. "Do I use parallelStream() or stream().parallel()?"
>
> For most folks, the expectation and intuition will be sequential, so take
> advantage of that: Let people come to c.stream().parallel() slowly and
> deliberately, after getting their feet wet with c.stream().
>
> --tim
>


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