William, Am 26.01.20 um 19:34 schrieb William Dauchy: > On Sun, Jan 26, 2020 at 7:20 PM Tim Düsterhus <t...@bastelstu.be> wrote: >>> int i; >> >> Consider moving this into the `while` loop to reduce the scope of `i`. > > I'm not against doing this when this is a block condition, but for a > loop, I find it a bit dirty and confusing. >
It boils down to personal preference I guess. I generally try to declare variables in the smallest possible scope, especially when it's a variable name such as `i`. I also would prefer to be able to declare variables C99 style (especially with for loops), because I "grew up" with languages where this is possible / the encouraged code style. tl;dr: The "consider" is to be interpreted as "consider". If you prefer the current form that's entirely okay with me :-) Best regards Tim Düsterhus