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 .
Author: | Kazilar Akinonris |
Country: | Bulgaria |
Language: | English (Spanish) |
Genre: | Relationship |
Published (Last): | 11 February 2011 |
Pages: | 331 |
PDF File Size: | 18.2 Mb |
ePub File Size: | 2.78 Mb |
ISBN: | 956-1-27364-858-3 |
Downloads: | 91770 |
Price: | Free* [*Free Regsitration Required] |
Uploader: | Zolok |
Andrei Alexandrescu
Avoid casting away const. Whenever it makes sense, provide a no-fail swap and provide it correctly.
All the standards contained herein have been rigorously scrutinized I have hundreds of emails to prove it!
Avoid type switching; prefer polymorphism. Avoid initialization dependencies across compilation units Copy and destroy consistently Don’t use unsafe functions. Define and initialize member variables in the same order. Know what not to standardize.
Avoid initialization dependencies across compilation units. When should you provide a no-fail swap? How do you choose the right STL search or sort algorithm?
Prefer algorithm calls to handwritten loops Whenever it makes sense, provide a no-fail swap and provide it correctly Namespaces and Modules Public inheritance is substitutability. Ensure resources are owned by objects. Use vector by default. Distinguish between errors and non-errors.
C++ Coding Standards – Book Home Page
Use vector by default. Avoid allocating and deallocating memory in different modules. Consider overloading to avoid implicit type conversions.
This product is part of the following series. Customize intentionally and explicitly Prefer calling the prefix forms. Prefer composition to inheritance Don’t write namespace usings in a header file or before an include.
C++ Coding Standards: 101 Rules, Guidelines, and Best Practices
Never write external include guards. Know when and how to code for concurrency. Dutter sufficiently portable types in a module’s interface. Use a version control system 4. The topical sections it covers are: How do you choose the right STL search or sort algorithm? Assert liberally to document internal assumptions and invariants Never write external include guards Functions and Operators Rely on types, not on representations Prefer writing nonmember nonfriend functions.
Prefer the canonical form of assignment Preserve natural semantics for overloaded operators What are the elements of a rational error handling policy? If you’re interested in creating a cost-saving package for your students, contact hdrb Pearson rep.
Series This product is part of the following series.
Be clear what kind of class you’re writing. Both authors draw on their personal extensive real-world project experience at commercial software companies ranging in size from small successful start-ups to RealNetworks to Microsoft. Prefer range operations to single-element operations.