Re: style change: explicitly permit braces for single statements

2020-07-11 Thread Nick Hudson
On 12/07/2020 04:01, Luke Mewburn wrote: On 20-07-12 10:01, Luke Mewburn wrote: | I propose that the NetBSD C style guide in to /usr/share/misc/style | is reworded to more explicitly permit braces around single statements, | instead of the current discourgement. | | IMHO,

Re: style change: explicitly permit braces for single statements

2020-07-11 Thread Michael van Elst
p...@whooppee.com (Paul Goyette) writes: >Another +1 here. The "add another statement" is frequently "add a >debug_printf()" and many is the time i've broken an if statement by >adding debug code. { debug_printf(); } works and doesn't get forgotten before committing. I personally find

Re: style change: explicitly permit braces for single statements

2020-07-11 Thread Luke Mewburn
On 20-07-12 10:01, Luke Mewburn wrote: | I propose that the NetBSD C style guide in to /usr/share/misc/style | is reworded to more explicitly permit braces around single statements, | instead of the current discourgement. | | IMHO, permitting braces to be consistently used: | - Adds

Re: style change: explicitly permit braces for single statements

2020-07-11 Thread Paul Goyette
On Sun, 12 Jul 2020, Valery Ushakov wrote: Luke Mewburn wrote: I propose that the NetBSD C style guide in to /usr/share/misc/style is reworded to more explicitly permit braces around single statements, instead of the current discourgement. IMHO, permitting braces to be consistently used: -

Re: style change: explicitly permit braces for single statements

2020-07-11 Thread Valery Ushakov
Luke Mewburn wrote: > I propose that the NetBSD C style guide in to /usr/share/misc/style > is reworded to more explicitly permit braces around single statements, > instead of the current discourgement. > > IMHO, permitting braces to be consistently used: > - Adds to clarity of intent. > - Aids

Re: style change: explicitly permit braces for single statements

2020-07-11 Thread David Holland
On Sun, Jul 12, 2020 at 10:01:36AM +1000, Luke Mewburn wrote: > I propose that the NetBSD C style guide in to /usr/share/misc/style > is reworded to more explicitly permit braces around single statements, > instead of the current discourgement. concur Really, there should always be braces

style change: explicitly permit braces for single statements

2020-07-11 Thread Luke Mewburn
I propose that the NetBSD C style guide in to /usr/share/misc/style is reworded to more explicitly permit braces around single statements, instead of the current discourgement. IMHO, permitting braces to be consistently used: - Adds to clarity of intent. - Aids code review. - Avoids gotofail: