3 ms·
There's standards and there's standards. C allows you to place your braces, commas, other tokens and whitespace in whatever form you desire. I suppose there's
by yason 14y ago
There's standards and there's standards.
C allows you to place your braces, commas, other tokens and whitespace in whatever form you desire. I suppose there's no need to get anal over those.
But then there are standards such as assertions, avoiding type casts, and breaking functions into helper functions. Those have an effect on code quality by setting up guards for conditions and sentinels for invariants.
I've had my code blown up an assert call so many times that writing all the rest of the assert calls have cost nothing compared to the savings initiated by forcing myself to evaluate where my thinking went wrong as the assert failed.
Formatting coding standards, again, should probably be banished in favor of letting programmers express their thinking in form of how they format their code. I'm pretty sure the best programmers all have top-notch consistent formatting over all their source code files. And if the worst programmers don't, we have bigger problems than formatting.