3 ms·
They add visual noise. The grammar of C is not the same as the grammar of it's offshoots and block statements aren't part of control structures. Moreover, GCC w
by kevin_thibedeau 6y ago
They add visual noise. The grammar of C is not the same as the grammar of it's offshoots and block statements aren't part of control structures. Moreover, GCC warns about extra statements with the same indentation level with -Wall on.
- tpush 6y agoIMO you get accustomed to single statement-braces very quick and they leave less room for errors.
- efwfwef 6y agoand remove bugs
- coldtea 6y ago>They add visual noise. Which is a good thing, since it prevents errors such as this one. Extra verbosity with mandatory braces is noise (to the degree that without it, the compiler could still infer what we mean), but some degree of verbosity is a good thing, as it helps make patterns in the code more evident. In which case we might want to call it a more fitting error than the dismissing "noise". How about "dither"?
- mmis1000 6y agoThat is probably why styles like if (cond) { // statement } else { // statement } existed. Allow you to quote everything while not waste so much vertical space.