- Represent ideas (concepts) directly in code, for example, as a function, a class, or an enu- meration; §1.2.
- Aim for your code to be both elegant and efficient; §1.2.
- Don’t overabstract; §1.2.
- Focus design on the provision of elegant and efficient abstractions, possibly presented as libraries; §1.2.
- Represent relationships among ideas directly in code, for example, through parameteriza- tion or a class hierarchy; §1.2.1.
- Represent independent ideas separately in code, for example, avoid mutual dependencies among classes; §1.2.1.
- C++ is not just object-oriented; §1.2.1.
- C++ is not just for generic programming; §1.2.1.
- Prefer solutions that can be statically checked; §1.2.1.
- Make resources explicit (represent them as class objects); §1.2.1, §1.4.2.1.
- Express simple ideas simply; §1.2.1.
- Use libraries, especially the standard library, rather than trying to build everything from scratch; §1.2.1.
- Use a type-rich style of programming; §1.2.2.
- Low-level code is not necessarily efficient; don’t avoid classes, templates, and standard- library components out of fear of performance problems; §1.2.4, §1.3.3.
- If data has an invariant, encapsulate it; §1.3.2.
- C++ is not just C with a few extensions; §1.3.3.
In general: To write a good program takes intelligence, taste, and patience. You are not going to get it right the first time. Experiment!