>
> 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
: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 -> ...)"
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
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