>
> The ability for developers to implement interfaces (knowingly or unknowingly)
> in non-spec-conforming ways aside, are you suggesting that we add a section
> in the Gatherer (and Collector) in the form of "Implementor Notes" that are a
> bit more high-level than the speci
single-use, Collector does not explain why they are reusable, why would
> Gatherers be held to a different standard?
>
> > "protecting the users from being given non-reusable Gatherers"
> Think of it more like increasing the odds that users are given
> spec-conformant Gatherers.
>
&g
Hi Viktor
Let me start with a question: is the requirement (a) "a Gatherer SHOULD be
reusable", or (b) "a Gatherer MUST be reusable"?
As of today the specification says (b), whereas the implementation matches (a).
In case of (a), I propose to align the specification to allow for compliant,
non-
Anthony
> Cheers,
>
> √
>
> **Viktor Klang**
> Software Architect, Java Platform Group
>
> Oracle
>
>
>
> **From:** Anthony Vanelverdinghe
> **Sent:** Saturday, 7 September 2024 21:03
> **To:** Viktor Klang ; core-libs-dev@openjdk.org
>
> **Subjec
(d::push)
> ...> );
> ...> }
> | created method concat(Supplier>)
>
> jshell> var **inject** = concat(() -> Stream.of(1,2))
> inject ==> GathererImpl[initializer=DEFAULT, integrator=$Lam ...
> 1c0d9c70@1a052a00]
>
> jsh
7;t exposed to user code. I'll keep this in mind for any upcoming
> maintenance 👍
>
> Keep the feedback coming 🙂
>
> Cheers,
>
> √
Kind regards,
Anthony
> **Viktor Klang**
> Software Architect, Java Platform Group
>
> Oracle
>
>
ns to inference, you can see usage examples in
> the implementation of Gatherers which does need some assistance to
> inference:https://github.com/openjdk/jdk/blob/master/src/java.base/share/classes/java/util/stream/Gatherers.java
>
> Cheers,
>
> √
>
> **Viktor Klang**
nference or is it possible that some
generic type bounds aren't as generic as they could be, prohibiting type
inference in certain cases?
> Cheers,
>
> √
>
> **Viktor Klang**
> Software Architect, Java Platform Group
>
> Oracle
Kind regards,
Anthony
>
>
>
When writing factory methods for Gatherers, there's sometimes a
degenerate case that requires returning a no-op Gatherer. So I'd like a
way to mark a no-op Gatherer as such, allowing the Stream implementation
to recognize and eliminate it from the pipeline. One idea is to add
Gatherer.defaultIn