Accelerated C++: Practical Programming by Example, Andrew Koenig and Rules, Guidelines, and Best Practices, Herb Sutter and Andrei Alexandrescu. Consistent, high-quality coding standards improve software quality, reduce time- to-market, promote teamwork, eliminate by Andrei Alexandrescu, Herb Sutter. Consistent, high-quality coding standards improve software quality, reduce time- to-market, promote teamwork, eliminate time wasted on inconsequential matters .
|Published (Last):||12 July 2010|
|PDF File Size:||10.44 Mb|
|ePub File Size:||7.14 Mb|
|Price:||Free* [*Free Regsitration Required]|
Correctness, simplicity, and clarity come first 7. What are the elements of a rational error handling policy? Invest in code reviews. Know when and how to code for stwndards Public inheritance is substitutability. Avoid initialization dependencies across compilation units.
Consider overloading to avoid implicit type conversions. What are the best ways to code for scalability? Distinguish between errors and non-errors Know what not to standardize.
Take parameters appropriately by value, smart pointer, or reference. But beware the trap of being too quick to think: Always write internal include guards.
Never write external include guards. Examples that demonstrate a rule or make it memorable.
Always initialize variables Take parameters appropriately by value, smart pointer, or reference. Otherwise, choose an appropriate container. Use vector and string instead of arrays Make data members private, except in behaviorless aggregates C-style structs.
You have never seen a book quite like this before. Copy and destroy consistently Write function objects correctly.
Preserve natural semantics for overloaded operators. Store only values and smart pointers in containers. Use vector and string:: Prefer calling the prefix forms. Use explicit RAII and smart pointers. Book Description Consistent, high-quality coding standards improve software quality, reduce time-to-market, promote teamwork, eliminate time wasted on aalexandrescu matters, and simplify maintenance.
Always write internal include guards. Use an automated build system. Use a checked STL implementation.
C++ Coding Standards: 101 Rules, Guidelines, and Best Practices
Don’t specialize function templates. Preview this title online. Make header files self-sufficient. Use vector and string::