Industrial Deals Beauty Save up to 90% on textbooks STEM nav_sap_plcc_ascpsc Starting at $39.99 Grocery Handmade Wedding Rustic Decor Home Gift Guide Off to College Home Gift Guide Book House Cleaning _baw _baw _baw  Introducing Echo Show Limited-time offer: All-New Fire HD 8 Kids Edition, starting at $99.99 Kindle Oasis Trade it in. Fund the next. Water Sports STEMClubToys17_gno



There was a problem filtering reviews right now. Please try again later.

Showing 1-10 of 10 reviews(Verified Purchases). See all 41 reviews
on September 4, 2011
Herb Sutter's "Exceptional C++" is the first part of a popular trilogy which has its roots in the "Guru of the Week" newsgroup series. It explicitly assumes that the reader already knows a lot about C++ and is therefore not as pedagogically oriented as Scott Meyers' "Effective C++".

The Good: it's refreshing to see each Item given in quiz format, especially if you've already read 3-4 short-essay C++ advice books (anyone considering "Exceptional C++" should at a minimum first read Meyers' "Effective C++, Third Edition"). Another factor that makes this book pleasant to read is the laid-back writing style. For example, when discussing a confusing piece of code Sutter says in a footnote: "the programmer of Derived ought to be taken out into the back parking lot and yelled at." (Item 21); similarly, when he first introduces the pimpl pointer he adds "//MYOB" (Item 23). Moving on to the themes covered, it should be noted that the book's title is mainly a pun: Sutter includes substantive material on a variety of topics, most notably on containment versus inheritance, the pimpl idiom, and name lookup. At a more fine-grained level, this book contains lots of fascinating tidbits of information. A few examples: a) publicly inheriting from char_traits<char> does not necessarily violate the Liskov Substitution Principle (Item 3), b) private inheritance does not need to keep us from using a derived object polymorphically as a base -- inside the derived object's own member functions and friends (Item 24), c) when calling a function inside a class, if the compiler finds a member it won't bother trying to use Koenig lookup to find free functions (Item 32), d) many of the counter-intuitive aspects of auto_ptr's interplay with change of ownership can be eliminated simply by using const auto_ptr (Item 37) -- of course, in this day and age it's better to avoid auto_ptr altogether, e) comparing pointers into string literals is undefined, so compilers are allowed to store string literals in overlapping areas of memory as a space optimization (Item 38), f) finally, we cannot use static_cast to go from char* to unsigned char* (Item 44). Despite the breadth of the material, there's no denying that one of the finest aspects of this volume is the 10-part miniseries on designing generic containers that are exception-safe (work properly in the presence of exceptions) and exception-neutral (propagate all exceptions to the caller). Regarding the style of the presentation, it's worth noting that certain Items end with a Summary of the lessons learned: this is very helpful when picking up the book months after having finished it. The same goes for many of the guideline boxes that the author has included. Some of these are very good reference material, e.g. the guideline in Item 20 on making an operator a member versus a nonmember function. This box in some senses typifies Sutter's writing: not always easy to read, but well structured and authoritative.

The Bad: in many cases the Item titles are completely uninformative (e.g. "Writing Exception-Safe Code -- Part 7"). On a different note, the writing is often not page-setting aware: Sutter reproduces code or text that we can still see on the facing page (e.g. pp. 4 & 5) or even on the same page (p. 22). The space wasted on duplicating things we can already see might have been dedicated to a few more clarifications (e.g. the return value optimization is mentioned in Items 10 & 46 but is never explained). A similar issue arises when Sutter flat-out repeats material already shown in a previous Item (e.g. Items 31 & 32). A related point is that some of the guideline boxes are too abstract: they tend to generalize the lesson learned and therefore make sense only when you read the entire Item. As a result, different Items sometimes have identical guidelines. This has two unwanted consequences: i) it essentially wastes space that could have been put to better use (as above), and ii) it interferes with skimming, since some of the guidelines are simply too vague to constitute a tangible lesson (e.g. "Know about and use design patterns.", Item 23). In connection to the latter point, let me note that Sutter (or maybe Alexandrescu) did a better job in the "Summary of Summaries" contained in "C++ Coding Standards". At a more detailed level, I also spotted a few more specific (minor) problems: a) in Item 5 the author uses O (that's uppercase O) to denote a template type parameter, a bad practice if ever there was one. b) In Item 23 we read: "you can get fancy and make method a nonclass template parameter instead." However, "nonclass template parameter" is not a C++ term. Perhaps Sutter wanted to say "non-type template parameter" but that wouldn't make sense either, since in the code he shows a type template parameter. c) Item 33 violates Item 23's guideline to prefer the Template Method pattern over public virtual functions. d) Item 44's guideline says "Prefer new-style casts" but Item 5 uses old-style casts. e) Item 43 first recommends const pass-by-value in a function definition and then criticizes a function definition with const pass-by-value by saying that this is "unuseful and misleading at best." f) Finally, in Item 21 Sutter writes: "Some authors even argue that 'void main()' might be standard-conforming. It isn't. It never was, not even in the 1970s, in the original pre-standard C." The problem is, "int main()" wasn't standard-conforming either in those bygone times (nothing was).

Sutter will probably produce a second edition of this book in the not too distant future. Even so, this doesn't mean that the book is out of date: many Items could be re-written in C++11, but most will stand you in good stead for many years to come (a glaring exception being Item 37 on auto_ptr) and would probably help you understand the C++11 simplifications more deeply. Overall, this book is a classic whose author is extremely knowledgeable in all things C++, so it's definitely worth reading. However, despite having been first published more than a decade ago, it does suffer from some presentation issues and minor inconsistencies, which is why I'm giving it 4 stars.

Alex Gezerlis
0Comment| 4 people found this helpful. Was this review helpful to you?YesNoReport abuse
on April 6, 2002
This is by far one of the best books on C++ I've ever bought. I am not going to claim that I've read this because this is not a book you 'read' before going to sleep. Even if you consider yourself a C++ guru, you really need to go spend a lot of time on each exercise - if you want to ace them, that's it.
If you aren't a C++ expert but at least can find your way, make sure you have Stroustroup's on your table when you get to this. Try to answer every question on this book with the help of Stroustroup's. You will learn *a lot* from the experience, and have a lot of fun, too. Also, if you run everything you do by your compiler, you will find compiler bugs, which for me is a plus because saves time in the long run.
As for the exercises themselves, all of them, without exception, are worth every penny. Not a single one has an obvious answer (a perfect one - sure you can give some decent if you know C++ well), and from all of them you will learn something valuable.
Finally, a quick list of the topics, since Amazon.com doesn't have one online at this time:
Generic Programming and the C++ Standard Library. Exception-Safety Issues and Techniques. Class Design and Inheritance. Compiler Firewalls and the Pimpl Idiom. Name Lookup, Namespaces and the Interface Principle. Memory Management. Traps, Pitfalls and Anti-Idioms. Miscellaneous Topic.
Each of the topic has 4-7 subtopics, each of them with a few exercises.
Don't miss this book.
0Comment| 16 people found this helpful. Was this review helpful to you?YesNoReport abuse
on October 31, 2014
More of an intermediate to advanced book on C++. Covers special topics. If you looking to hone your C++ skills, the "puzzles" in this book are good exercise. Makes for good homework assignments if you are teaching C++.
0Comment|Was this review helpful to you?YesNoReport abuse
on October 15, 2015
I know this is quite a famous book, but I find the style off-putting. I also find that this is no longer as timely as Scott Meyers's books continue to be.
0Comment|Was this review helpful to you?YesNoReport abuse
on July 12, 2011
This is an absolutely great book in many respects. However, it has two major problems to be aware of.

1. It was written from the generic library writer point of view.
2. The difficulty of writing exception safe code is rated artificially low. Dealing with exception safety issues is rated at difficulty <= 9, at the same time trivial class construction issues (like passing parameters by const reference) are rated at 7.

IMHO, the contents of this book does contradict its main advice about the possibility for mere mortals to use c++ exceptions beyond the absolute minimum of catching them at the origin.

So, if you are not a member of small super-guru team writing general purpose library (like boost or may be just working for thoughtworks) you will be much better off by not using exceptions at all. Especially if you are working on a large or very large project, where involvement of under-qualified engineers is inevitable over the long run.
0Comment| 3 people found this helpful. Was this review helpful to you?YesNoReport abuse
on December 26, 2015
great book
0Comment|Was this review helpful to you?YesNoReport abuse
on March 24, 2011
Herb Sutter is capable of thinking and reasoning software problem, after finishing this book, I read all the material Herb Sutter wrote on the topic of parallel programming.
0Comment|Was this review helpful to you?YesNoReport abuse
on May 15, 2009
Great book for people who are looking to learn more about writing great C++. I recommend it.
0Comment| One person found this helpful. Was this review helpful to you?YesNoReport abuse
on December 18, 2011
This book is full of theorical, language-related information in that it's trying to shed lights into some dark corners of the language or go over points in certain well known issues in C++ programming such as pimp pattern, known issues related to throwing exceptions, etc. In doing so, it offers no practical advise that you can bring home with. Not only that, experienced readers will detect a sene of 'cutting corners' in some subject in the book. For example, when it offers tips on how to write 'execption-safe' and 'exception nueutral', it cited problems raised by Cargill's "Exception handling: a false sense...', it did not bother to state what the problems are before going into offering tips to solve the problems. All the things the book talks about, are simply a repeat of materials found in books written previously by the 'masters' such as 'Design Patterns' by gang of four, C++ Template by Josutis, and 'the C++ Programming language' by Stroustrup but in a unprofessional writing style suitable only for 'for Dummies' category. If you are a beginner in C++, then this may have some value in that it gives a sense of what you may face in c++ programming but if you have some years in C++ programming with real projects then this book is a waiste of time - in my opinion. You're better off putting your time and effort by reading those books that I mentioned.
0Comment|Was this review helpful to you?YesNoReport abuse
on February 8, 2016
Good for intermediate to advanced programmers. Provides a number of new concepts and ideas
0Comment| One person found this helpful. Was this review helpful to you?YesNoReport abuse