News for hackers. Stuff that matters.
Re:The Only Coding Standard You'll Ever Need by justanotheratom on Friday August 10, 2012 @02:49PM (#4367603)
Agreed. The author focuses on the right and wrong of things, but it is really about conventions.

One could argue that opening brace on the same line makes code look more "natural", or opening brace on a new line makes it look more "symmetric". But instead of reasoning about which way is better or worse, one should focus on coming up with a rule that is prescriptive and covers all cases.

For example, the "opening brace placement" rule should prescribe the position of the brace in all these cases (for C language): 1. if and for loops 2. Function definition 3. Switch statements

There are no comments on this comment yet.