Hi Jeremie,

Jeremie Courreges-Anglas wrote on Sat, Feb 01, 2020 at 01:37:32PM +0100:
> On Fri, Jan 31 2020, Ingo Schwarze <[email protected]> wrote:
>> [email protected] wrote on Fri, Jan 31, 2020 at 10:14:52PM +0900:

>>> Reduce scope of a few variables.

>> No, this contradicts OpenBSD coding style.
>> We want local variables declared up front in functions
>> such that you can see at one glance which variables exist.

> Huh, this is your personal preference and I strongly disagree with
> making it an "official" stance (again).  Reducing the scope of variables
> *quite often* helps reasoning about them.
> 
> style(9) said something like that, and has been changed three years
> ago (for good IMO).
> 
>   revision 1.68
>   date: 2016/10/18 18:13:56;  author: millert;  state: Exp;  lines: +2 -4;  
> commitid: aPPHgmmA4hseZUFx;
>   Don't tell the programmer not to put variable declarations inside
>   blocks.  OK guenther@ kettenis@

Oops.  Sorry for forgetting that the recommendation was dropped and
for making you dig up the commit and thanks for reminding me.

Yours
  Ingo

Reply via email to