Re: java.util.stream.Stream: API for user-extensible intermediate operations

2023-06-29 Thread Viktor Klang
Over the past 6+ months I've been thinking about, and tinkering with, how we'd be able to expose a user-facing API for extensible intermediate java.util.stream.Stream operations―a feature envisioned all the way back when Streams were created. I'm now at a point where I have a viable design an

Re: java.util.stream.Stream: API for user-extensible intermediate operations

2023-06-29 Thread Brian Goetz
Please be mindful of the request Viktor made: for feedback on the approach and the API concepts.  It should be pretty clear that low-level details like "unsupportedCombiner" are many levels down below "approach and concepts".  (And, you know the rule: when you bikeshed on a low-level detail whe

Re: java.util.stream.Stream: API for user-extensible intermediate operations

2023-06-29 Thread forax
> From: "Viktor Klang" > To: "Remi Forax" > Cc: "core-libs-dev" > Sent: Thursday, June 29, 2023 11:09:22 AM > Subject: Re: java.util.stream.Stream: API for user-extensible intermediate > operations > From: Remi Forax > Sent: Thursday, 29 J

Re: java.util.stream.Stream: API for user-extensible intermediate operations

2023-06-29 Thread Viktor Klang
From: Remi Forax Sent: Thursday, 29 June 2023 10:03 To: Viktor Klang Cc: core-libs-dev Subject: [External] : Re: java.util.stream.Stream: API for user-extensible intermediate operations From: "Viktor Klang" To:

Re: java.util.stream.Stream: API for user-extensible intermediate operations

2023-06-29 Thread Remi Forax
> From: "Viktor Klang" > To: "core-libs-dev" > Sent: Tuesday, June 27, 2023 7:10:42 PM > Subject: java.util.stream.Stream: API for user-extensible intermediate > operations > Hi core-libs-dev, > Over the past 6+ months I've been thinking about, an

Re: java.util.stream.Stream: API for user-extensible intermediate operations

2023-06-28 Thread Brian Goetz
Thanks for these comments.  To respond indirectly to your point about parallelization, many of the challenges arise from a tradeoff made in designing Spliterator, that arises from the desire to be able to extract parallelism not only from the really easy case (arrays), but also more complex cas

Re: java.util.stream.Stream: API for user-extensible intermediate operations

2023-06-28 Thread Tagir Valeev
Hello! Interesting read, thanks. I'm the author of the StreamEx library, which actually enhances Stream API, and I use it during my daily job, so I have some thoughts about extending Stream API as well. Below are some of them. First, there are many useful operations that can be trivially defined

java.util.stream.Stream: API for user-extensible intermediate operations

2023-06-27 Thread Viktor Klang
Hi core-libs-dev, Over the past 6+ months I've been thinking about, and tinkering with, how we'd be able to expose a user-facing API for extensible intermediate java.util.stream.Stream operations—a feature envisioned all the way back when Streams were created. I'm now at a point where I have a