Herb Sutter may well know the C++ programming language better than anyone else. He's worked with the language for years; he sits on its international standards committee; he works on the Microsoft Visual C++ team--his list of qualifications is astounding. That is, however, only part of the reason you should pay attention to Exceptional C++ Style
. A more important reason is that he understands how to teach software developers: To wit, he issues challenges and dares the programmers to figure them out. Sutter grasps the importance of not lecturing smart people, and knows that guided exploration goes a very long way.
To give an example of Sutter's challenges (40 of them, graded by difficulty, appear in this dense book) would take more space than is available here. Know, however, that while some of them deal with obscure parts of C++, most do not, and the majority of the challenges deal with aspects of the language you use all the time. Sutter's approach doesn't consist exclusively of challenges and solutions, either--the author takes time to distill the exercises into design recommendations, making it easy for programmers to remind themselves of what they've learned. --David Wall
Topics covered: How to take a journeyman's skill with C++ and turn it into something more masterly, by exploring the behavior of C++ and its various parts in detail. Coverage deals with inheritance and other aspects of object orientation, exception handling, memory management, and templating.
Software "style" is about finding the perfect balance between overhead and functionality...elegance and maintainability...flexibility and excess. In Exceptional C++ Style, legendary C++ guru Herb Sutter presents 40 new programming scenarios designed to analyze not only the what but the why and help you find just the right balance in your software. Organized around practical problems and solutions, this book offers new insight into crucial C++ details and interrelationships, and new strategies for today's key C++ programming techniques--including generic programming, STL, exception safety, and more. You'll find answers to questions like: *What can you learn about library design from the STL itself? *How do you avoid making templated code needlessly non-generic? *Why shouldn't you specialize function templates? What should you do instead? *How does exception safety go beyond try and catch statements? *Should you use exception specifications, or not? *When and how should you "leak" the private parts of a class? *How do you make classes safer for versioning? *What's the real memory cost of using standard containers? *How can using const really optimize your code?*
How does writing inline affect performance? *When does code that looks wrong actually compile and run perfectly, and why should you care? *What's wrong with the design of std::string? Exceptional C++ Style will help you design, architect, and code with style--and achieve greater robustness and performance in all your C++ software.