Skip to content

StreamConverters toScala: add type class for collections with efficient merging #11466

Open
@lrytz

Description

@lrytz

In 2.13, scala.jdk.StreamConverters adds a toScala extension method to streams that allows converting a stream to arbitrary Scala collections.

Collecting a parallel stream is especially efficient when the target collection supports efficient merging.

Currently the toScala method is special-cased for the Accumulator factory. It would make sense to generalize the ad-hoc AccumulatorFactoryInfo into a type class for collections that support efficient merging.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions