original: https://lemmy.blahaj.zone/post/8572031
I quite like GNU
GNU style is logical, because braces are syntactically a single statement:
while (x == y) func1(); // can be replaced by { ... }
However, I prefer to entirely avoid unbraced single statements after while/if:
while (x == y) { func1(); // easy to add func2(); later }
Although this is ok when it fits:
while (x == y) func1(); // brevity!
Be sure to follow the rule before you head out.
Rule: You must post before you leave.
^other^ ^rules^
I quite like GNU
GNU style is logical, because braces are syntactically a single statement:
However, I prefer to entirely avoid unbraced single statements after while/if:
Although this is ok when it fits: