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):||12 October 2004|
|PDF File Size:||12.38 Mb|
|ePub File Size:||5.82 Mb|
|Price:||Free* [*Free Regsitration Required]|
Distinguish between qlexandrescu and non-errors. If you provide any class-specific coing, provide all of the standard forms plain, in-place, and nothrow. Distinguish between errors and non-errors If you’re interested in creating a cost-saving package for your students, contact your Pearson rep.
Prefer calling the prefix forms Table of Contents Preface. The Legend of Zelda: Know when and how to code for concurrency Coding standards have many advantages: Make data members private, except in behaviorless aggregates C-stylestructs.
Consider overloading to avoid implicit type conversions Ensure resources are owned by objects. You have successfully signed out and will be required to sign back in should you need to download more resources.
If you provide any class-specific new, provide all of the standard forms plain, in-place, and nothrow Construction, Destruction, and Copying Inherit, not to reuse, but to be reused. Know what not to standardize. Use vector by default.
Use const proactively – C++ Coding Standards: Rules, Guidelines, and Best Practices [Book]
Use vector by default. Minimize global and shared data. Avoid inheriting from classes that were not designed to be base classes. Use the right STL search algorithm. Design and write error-safe code. But this book is something more: Prefer calling the prefix forms. Organizational and Policy Alexandrfscu. Use a checked STL implementation.
Use the right STL sort algorithm Keep a type and its nonmember function interface in the same namespace. Make header files self-sufficient Prefer to use exceptions to report errors.
If you provide any class-specific new, provide all of the standard forms plain, in-place, and nothrow.
Why should you use STL vector and string instead of arrays? Avoid allocating and deallocating memory in different modules Always provide new and delete together The organization is clear and intuitive, coidng topics are pertinent, and the content is of the highest quality. Define and initialize member variables in the same order.
C++ Coding Standards: 101 Rules, Guidelines, and Best Practices
Any and usually rare cases when a rule doesn’t apply. Whenever it makes sense, provide a no-fail swap and provide it correctly.
Prefer composition f inheritance. Why and how should you prevent exceptions from propagating across module boundaries? Rely on types, not on representations. Consider overloading to avoid implicit type conversions. Use an automated build system. Give one entity one cohesive responsibility 6. This product is part of the following series. Use explicit RAII and smart pointers. Students, buy or rent this eText. Prefer the canonical forms of codibg and assignment operators.
Don’t use unsafe functions.
C++ Coding Standards: 101 Rules, Guidelines, and Best Practices by Andrei Alexandrescu, Herb Sutter
Avoid inheriting from classes that were not designed to be base classes Along the way, you’ll find answers to questions like What’s worth standardizing–and what isn’t? Prefer range operations to single-element operations.
Prefer compile- and link-time errors to run-time errors. Know when and how to code for scalability.