Difference between revisions of "CCoding Style - Consistency and Idioms"
m (1 revision)
m (1 revision imported: EdWiki -- Emsys pages from Shukra)
Latest revision as of 09:30, 23 June 2015
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.