Re: [EXT] for loops, returns, and other animals

2024-12-05 Thread Gianluca Sartori
> > In our projects, we have style checks that suggest "for (x in y) ..." over > "for (T x : y) ...". The "in" form is groovy idiom and the ":" form is for > java compat. Switching to use "y.each { x-> ... }" or "y.forEach(x -> > ...)" is a personal preference. Note: the debugger steps through t

Re: [EXT] for loops, returns, and other animals

2024-12-04 Thread Milles, Eric (TR Technology) via dev
:02 PM To: Groovy_Developers Cc: Milles, Eric (TR Technology) Subject: Re: [EXT] for loops, returns, and other animals Miles, On 4. 12. 2024, at 18:21, Milles, Eric (TR Technology) via dev wrote: ... Switching to use "y.each { x-> ... }" or "y.forEach(x -> ...)"

Re: [EXT] for loops, returns, and other animals

2024-12-04 Thread OCsite
Miles, > On 4. 12. 2024, at 18:21, Milles, Eric (TR Technology) via dev > wrote: > ... Switching to use "y.each { x-> ... }" or "y.forEach(x -> ...)" is a > personal preference. Absolutely. Nevertheless my own personal preference very strongly prefers :) the each, for it is a pure OO approac

Re: [EXT] for loops, returns, and other animals

2024-12-04 Thread Milles, Eric (TR Technology) via dev
In our projects, we have style checks that suggest "for (x in y) ..." over "for (T x : y) ...". The "in" form is groovy idiom and the ":" form is for java compat. Switching to use "y.each { x-> ... }" or "y.forEach(x -> ...)" is a personal preference. Note: the debugger steps through the for