C++ Coding Standards: 101 Rules, Guidelines, and Best Practices
by Herb Sutter, Andrei Alexandrescu
Design Style
Fools ignore complexity. Pragmatists suffer it. Some can avoid it. Geniuses remove it.
—Alan Perlis
But I also knew, and forgot, Hoare’s dictum that premature optimization is the root of all evil in programming.
—Donald Knuth, The Errors of TeX [Knuth89]
It’s difficult to fully separate Design Style and Coding Style. We have tried to leave to the next section those Items that generally crop up when actually writing code.
This section focuses on principles and practices that apply more broadly than just to a particular class or function. A classic case in point is the balance among simplicity and clarity (Item 6), avoiding premature optimization (Item 8), and avoiding premature pessimization (Item 9). Those three Items apply, not ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access