Avoid returning handles to object internals. When the object is destroyed, the handles may still exist.Effective C++: 55 Specific Ways to Improve Your Programs and Designs
A good API is easier to use than misuse. If there are two ways to use an API, chances are people will use it both ways.Effective C++: 55 Specific Ways to Improve Your Programs and Designs
Never depend on the order of evaluation of function arguments, because it's unspecified.Effective C++: 55 Specific Ways to Improve Your Programs and Designs
Inheritance is the base class of evil: always prefer composition over inheritance.Effective C++: 55 Specific Ways to Improve Your Programs and Designs
Prefer compile-time checks to runtime checks. Logic errors implemented in source code become syntax errors at compile time.Effective C++: 55 Specific Ways to Improve Your Programs and Designs
Make sure that resources are always released by the time an object is destroyed.Effective C++: 55 Specific Ways to Improve Your Programs and Designs
When efficiency is paramount, prefer the standard library to language idioms.Effective C++: 55 Specific Ways to Improve Your Programs and Designs