Thanks for the JEP and your talk, Viktor! I think `Stream::gather` will be super useful in my day-to-day as a Java developer. I’m curious why `fold` is being implemented with gatherers. I recognize `Gatherer` is designed to support intermediate operations, but `fold` feels inherently like a terminal operation to me since it, like `reduce` or `collect`, consumes all the elements in the stream and produces a single result. Is there a technical limitation to making `fold` a terminal operation? For example, does `Collector` inherently presume parallelization in a way that `Gatherer` does not? Or is the idea mainly to demonstrate the power of gatherers, and we could also make `fold` a terminal operation with the current `Stream` API? Thank you! Tyler Kindy
|
- Update on JEP-461: Stream Gatherers (Preview) Viktor Klang
- Re: Update on JEP-461: Stream Gatherers (Preview) Tyler Kindy
- Re: [External] : Re: Update on JEP-461: Stream Gathe... Viktor Klang
- Re: [External] : Re: Update on JEP-461: Stream G... Tyler Kindy
- Re: [External] : Re: Update on JEP-461: Stre... Viktor Klang
- Re: [External] : Re: Update on JEP-461:... Remi Forax
- Re: [External] : Re: Update on JEP-... Viktor Klang