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):||5 October 2006|
|PDF File Size:||5.53 Mb|
|ePub File Size:||13.46 Mb|
|Price:||Free* [*Free Regsitration Required]|
Don’t treat arrays polymorphically. Public inheritance is substitutability. All the standards contained herein have been standwrds scrutinized I have hundreds of emails to prove it! Preserve natural semantics for overloaded operators. Suhter writing nonmember nonfriend functions Give one entity one cohesive responsibility. Avoid allocating and deallocating memory in different modules. Consider overloading to avoid implicit type conversions. What are the best ways to code for scalability?
When should you provide a no-fail swap?
Signed out You have successfully signed out and will be required to sign back in should you need to download more resources. Make base class destructors public and virtual, or protected and nonvirtual Hoare on Testing October How and why do you avoid unnecessary initialization, cyclic, and definitional dependencies? Avoid type switching; prefer polymorphism You have successfully signed out and will be required to sign back in should you need to download more resources.
Herrb the canonical form of assignment. Use a checked STL implementation Use an automated build system 3. Prefer to use exceptions to report errors. Students, buy or rent this eText.
Prefer the canonical forms of arithmetic and assignment operators. Store only values and smart pointers in containers. Store only values and smart pointers in containers. Consider making virtual functions nonpublic, and public functions nonvirtual. Minimize global and shared data. Avoid casting away const.
What are the elements of a rational error handling policy? With Safari, you learn the way you learn best. Coding standards have many advantages: Avoid initialization dependencies across compilation units.
Prefer initialization to assignment in constructors. Use a version control system 4.
Why and how should you prevent exceptions from propagating across module boundaries? How do you choose the right STL search or sort algorithm?
C++ Coding Standards: 101 Rules, Guidelines, and Best Practices
Prefer function objects over functions as algorithm and comparer arguments. Establish a rational error handling policy, and follow it strictly. Use vector by default.
Know what not to standardize. An extended explanation of the guideline.