Exceptional C++ Style: 40 New Engineering Puzzles, Programming Problems, and Solutions 1st Edition
|
Herb Sutter
(Author)
Find all the books, read about the author, and more.
See search results for this author
|
Use the Amazon App to scan ISBNs and compare prices.
Enter your mobile number or email address below and we'll send you a link to download the free Kindle App. Then you can start reading Kindle books on your smartphone, tablet, or computer - no Kindle device required.
-
Apple
-
Android
-
Windows Phone
-
Android
|
Download to your computer
|
Kindle Cloud Reader
|
Frequently bought together
Customers who viewed this item also viewed
What other items do customers buy after viewing this item?
Editorial Reviews
Amazon.com Review
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.
From the Back Cover
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.
About the Author
Herb Sutter is the author of three highly acclaimed books, Exceptional C++ Style, Exceptional C++, and More Exceptional C++ (Addison-Wesley). He chairs the ISO C++ standards committee, and is contributing editor and columnist for C/C++ Users Journal. As a software architect for Microsoft, Sutter leads the design of C++ language extensions for .NET programming.
I'd like to read this book on Kindle
Don't have a Kindle? Get your Kindle here, or download a FREE Kindle Reading App.
Product details
- Publisher : Addison-Wesley Professional; 1st edition (August 2, 2004)
- Language : English
- Paperback : 325 pages
- ISBN-10 : 0201760428
- ISBN-13 : 978-0201760422
- Item Weight : 3.53 ounces
- Dimensions : 9.22 x 7.4 x 0.66 inches
-
Best Sellers Rank:
#760,083 in Books (See Top 100 in Books)
- #295 in C++ Programming Language
- #2,062 in Computer Programming Languages
- #3,493 in Computer Software (Books)
- Customer Reviews:
Customer reviews
Top reviews from the United States
There was a problem filtering reviews right now. Please try again later.
By c.z. on March 10, 2021
As an example, the items that I found most memorable included his investigation of how compilers failed to adhere to the standard when it comes to template friend function look up, with the surprising result that the normally reliable g++ is the worst offender. Additionally, he demonstrates several ways to call private member functions from outside of a class. I'm certain that fans of the last two books will get a kick out of this stuff, but it's not quite at the same level as his work designing for exception safety.
In addition to the usual question-essay-guideline format, the book has a substantial final section dissecting some failings of publicly-available code, which is where I assume the title of the book comes from. Those with fond memories of Tom Cargill's C++ Programming Style will definitely like this bit.
Despite the fact that the material is arguably slightly thinner than usual, the number of pages is actually up on the previous books. Sutter's writing style has also expanded. However, in a couple of places, the writing could have done with some editing. There are some witty asides and extraneous material that take up just a bit too much space.
Nonetheless, Sutter-nutters will probably not be too disappointed by Exceptional C++ Style. I still really enjoyed this book; reading it was time well spent.
There is something for everyone in this book, from the obscure and astonishing ("How many consecutive '+' characters can appear in a standards-conforming program?"), to the pragmatic ("When should you use inlining?"), to the advanced ("How generic should you make your templates, and why?").
I've been programming in C++ for 16 years now, and I learned quite a lot from reading this book. Yet, you don't have to be a C++ veteran to appreciate the advice that is provided: novice C++ programmers will find the items just as useful as old hands at C++ programming.
The book is well written, in clear and concise style, and never boring. (A number of creative footnotes even produce the occasional laugh.) The material is well organized, presented in groups of topics that relate to each other, and the table of contents and index make it easy to locate a topic for reference. And the bibliography contains things that are actually worth reading, rather than meaningless filler material.
I most appreciated Herb's honesty when dealing with various not-so-great aspects of C++. He doesn't shy back from pointing out when things are bad and simply shouldn't be used (such as exception specifications). The items I enjoyed the most are about the design of std::string, which Herb dissects (or should I say "trashes"?) unmercifully. To me, the book is worth buying just for these items alone because they provide splendid insight into what distinguishes good design from bad design, and how methodical and clear thinking is essential to writing good programs. ("Beware the behemoth of the Winnebago class -- it will haunt you onto the fourth generation...")
In summary, I think every C++ programmer should read this book. Yes, it's *that* good.
The only problem now that I have is, with all three of these books on my shelf, it takes longer to figure out where I read something of on a particular topic. The topical sections of each book overlap (E.g., sections covering exception eafety, memory managment and inheritance appear in all three books.) and they are all written at the same level of difficulty overall. The later books do make plenty of references back to the earlier ones as well as some other very good C++ books but this material would be better organized in one volume rather than three. Perhaps they should have been published as three editions of the same book rather than three separate books. That's the only thing I can think of that would have made them more useful. Even so this book, like the other two, is very good exercise for keeping C++ programming skills sharp. Well done!
Top reviews from other countries
Das Buch wurde 2005 veröffentlicht und ist ein Relikt früherer C++ Versionen. Die angesprochenen Exempels sind oft
veraltet und der Autor selbst schreibt, dass man das Buch nicht von der 1. bis zur letzten Seite lesen muss.
Der Erfinder von C++ Bjarne Stroustrup ist aktueller, vielfältiger und in den gegebenen Beispielen detailreicher.









