CCoding Style - Consistency and Idioms
Consistency and Idioms
- Consistency leads to better programs.
- If formatting varies unpredictably, or a loop over an array runs uphill this time and downhill the next, or strings are copied with strcpy here and a for loop there, the variations make it harder to see what’s really going on.
- But if the same computation is done the same way every time it appears, any variation suggests a genuine difference, one worth noting.