Editorial Reviews. From the Back Cover. Consistent, high-quality coding standards improve Guidelines, and Best Practices (C++ In-Depth Series) eBook: Andrei Alexandrescu, Herb Sutter: Kindle Store. Covers coding standards for C++. C++ Coding Standards: Rules, Guidelines, and Best Practices. Herb Sutter. Andrei Alexandrescu. © |Addison-Wesley Professional | Available. Consistent, high-quality coding standards improve software quality, reduce time- to-market, promote teamwork, eliminate by Andrei Alexandrescu, Herb Sutter.
|Published (Last):||21 December 2018|
|PDF File Size:||5.74 Mb|
|ePub File Size:||18.23 Mb|
|Price:||Free* [*Free Regsitration Required]|
Otherwise, choose an appropriate container Make base class destructors public and virtual, or protected and nonvirtual. Each standard is d concisely, with practical examples.
How do you practice “safe” overriding? Write function objects correctly Type Safety What are the best ways to code for scalability? Consider Clone instead of copying in base classes. Avoid deep nesting Ensure resources are owned by objects. Make data members private, except in behaviorless aggregates C-style structs Legend Of Zelda, The: Know when and how to code for scalability 8. Prefer to use exceptions to report errors Prefer sitter objects over functions as algorithm and comparer arguments.
C++ Coding Standards: 101 Rules, Guidelines, and Best Practices by Andrei Alexandrescu, Herb Sutter
Use the accepted idioms to really shrink capacity and really erase elements STL: Establish a rational error handling policy, and follow it strictly Prefer the canonical form of assignment How do you choose the right STL search or sort algorithm? Why shouldn’t you write namespace declarations or directives in a header file? Don’t write unintentionally nongeneric code. Use vector by default.
How and why do you avoid unnecessary initialization, cyclic, and definitional dependencies? Description Every software development team should have and follow a coding standard. How do you practice “safe” overriding? Class Design and Inheritance. Don’t write code that depends on the order of evaluation of functionarguments.
Use vector by default. Construction, Destruction, and Copying.
C++ Coding Standards: 101 Rules, Guidelines, and Best Practices
Prefer to use exceptions to report errors. Consistent, high-quality coding standards improve software quality, reduce time-to-market, promote teamwork, eliminate time wasted on inconsequential matters, and simplify maintenance.
When should you provide a no-fail swap? Blend static and dynamic polymorphism judiciously Minimize global and shared data. Use vector by default.
Avoid allocating and deallocating memory in different modules Use the right STL search algorithm. Start Free Trial No credit card required. Consider overloading to avoid implicit type conversions Write function objects correctly. You have successfully signed out and will be required to sign back in should you need to download more resources. Prefer function objects over functions as algorithm and comparer arguments. Use vector and string:: Along the way, you’ll find answers to questions like Codiing worth standardizing–and what isn’t?
Prefer providing abstract interfaces. With Safari, you learn the way you learn best. Prefer range operations to single-element operations Prefer compile- and link-time errors to run-time errors.
C++ Coding Standards: Rules, Guidelines, and Best Practices [Book]
Use a checked STL implementation. Don’t use unsafe functions. Avoid exception specifications STL: Define and initialize member variables in the same order.
Explicitly enable or disable copying If you provide any ssutter new, provide all of the standard forms plain, in-place, and nothrow. Establish a rational error handling policy, and follow it strictly. Sign In We’re sorry! Minimize global and shared data.