Drop Arrays.parallelStream()?

Tim Peierls tim at peierls.net
Sat Apr 20 15:10:33 PDT 2013

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.


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().


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