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):||14 August 2013|
|PDF File Size:||3.1 Mb|
|ePub File Size:||11.92 Mb|
|Price:||Free* [*Free Regsitration Required]|
Never write external include guards.
C++ Coding Standards: 101 Rules, Guidelines, and Best Practices by Andrei Alexandrescu, Herb Sutter
Prefer algorithm calls to handwritten loops Prefer minimal classes to monolithic classes. Make predicates pure functions. Use sufficiently portable types in a module’s interface.
Report, handle, and translate errors appropriately Invest in code reviews.
Sutter & Alexandrescu, C++ Coding Standards: Rules, Guidelines, and Best Practices | Pearson
Inherit, not to reuse, but to be reused. Don’t use varargs ellipsis.
Preserve natural semantics for overloaded operators. Don’t write code that depends on the order of evaluation of functionarguments.
C++ Coding Standards: 101 Rules, Guidelines, and Best Practices
Get unlimited access to videos, live online training, learning paths, books, tutorials, and more. Explicitly enable or disable copying If you provide any class-specific new, provide all of the standard forms plain, in-place, and nothrow.
Avoid type switching; prefer polymorphism Prefer minimal classes to monolithic classes Use the accepted idioms to really shrink capacity and really erase elements. Sign Up Already have an access code?
Click on a coing title to see the full list of products in the series. Always provide new and delete together The simplest meaningful sound bite we could come up with as a mnemonic for the rule.
Correctness, simplicity, and clarity come first codnig. Declare variables as locally as possible Prefer writing nonmember nonfriend functions Avoid providing implicit conversions.
C++ Coding Standards: Rules, Guidelines, and Best Practices [Book]
Prefer compile- and link-time errors to run-time errors. Know what not to standardize.
Table of Contents Preface. Compile cleanly at high warning levels. Until now, this body of knowledge has been available only as folklore or spread in bits and pieces throughout books. Any and usually rare cases when a rule doesn’t apply.
Avoid calling virtual functions in constructors and destructors. Design and write error-safe code.
Consider making virtual functions nonpublic, and public functions nonvirtual. The Legend of Zelda: Use an automated build system. How do you practice “safe” overriding?