RFR: JDK-8319123 : Implementation of JEP-461: Stream Gatherers (Preview)

Viktor Klang vklang at openjdk.org
Wed Nov 8 16:34:08 UTC 2023


On Wed, 8 Nov 2023 16:28:55 GMT, Tagir F. Valeev <tvaleev at openjdk.org> wrote:

>> Perhaps the best thing here is to change such that the supplier supplies something non-zero like "String: "?
>
> Such an example still looks artificial for me, as it's easy to rewrite with `reduce()` (just prepend with prefix outside of the stream). Well, it's up to you.

But you might not want to exit the stream just yet, and have to create a whole new stream.

In any case, I think it would be great to have a better example, I'm just not sure what that'd be just yet. Open to suggestions! :)

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/16420#discussion_r1386901231


More information about the core-libs-dev mailing list