Re: [EXT] Re: [DISCUSS] Lazy findAll, collect, collectMany

2025-04-09 Thread Paul King
h it's not quite ready for publication. Paul. > > From: Jochen Theodorou > Sent: Wednesday, April 9, 2025 6:21 AM > To: dev@groovy.apache.org > Subject: [EXT] Re: [DISCUSS] Lazy findAll, collect, collectMany > > External Email: Use caution wit

Re: [DISCUSS] Lazy findAll, collect, collectMany

2025-04-09 Thread Paul King
Most comments inline, but just some more background. We have many existing operators on Iterators that are "lazy". By lazy, I just mean return an iterator. Lazy in this context is a relative term. While all the methods return an iterator, they have varying degrees of laziness (repeat has storage im

Re: [DISCUSS] Lazy findAll, collect, collectMany

2025-04-09 Thread MG
Doing a bit of thinking out loud on this: 1. The "Lazy" postfix to me seems to indicate very clearly what trait these family of methods share and why they are here. 1. I also feel that the methods would not be used that often, since for typical collection sizes performance differenc

Re: [EXT] Re: [DISCUSS] Lazy findAll, collect, collectMany

2025-04-09 Thread Milles, Eric (TR Technology) via dev
? It helps me at least to see what it would take to do the same without the extension. From: Jochen Theodorou Sent: Wednesday, April 9, 2025 6:21 AM To: dev@groovy.apache.org Subject: [EXT] Re: [DISCUSS] Lazy findAll, collect, collectMany External Email: Use

Re: [DISCUSS] Lazy findAll, collect, collectMany

2025-04-09 Thread Jochen Theodorou
On 09.04.25 03:25, Paul King wrote: Hi folks, [I sent this to grails dev list but meant to send it here and CC them for feedback - anyway, it is here now, apologies if you see this twice.] I have been looking at the functionality in Groovy-stream[1] and Gatherers4J[2] lately with a view to fill

Re: [DISCUSS] Lazy findAll, collect, collectMany

2025-04-08 Thread Paul King
In any case, I created a draft PR and some interesting points came up which I think deserve more discussion. https://github.com/apache/groovy/pull/2182 I have marked all of the methods as @Incubating for now, in case we want to merge and tweak later. What's in the PR? I went with the "Lazy"

[DISCUSS] Lazy findAll, collect, collectMany

2025-04-08 Thread Paul King
Hi folks, [I sent this to grails dev list but meant to send it here and CC them for feedback - anyway, it is here now, apologies if you see this twice.] I have been looking at the functionality in Groovy-stream[1] and Gatherers4J[2] lately with a view to filling any gaps in Groovy's iterator DGM