The Five Most Important C++ Books by Scott Meyers
To make this list (and all subsequent lists in this series) more meaningful, I’ve decided to impose two constraints on myself. First, I’m really going to limit myself to five books. There will be no spots with more than one book sharing the glory, no honorable mentions for books almost making the cut. Five slots, five books. Second, I’m not going to eliminate my own books from the running. If I’m going to judge others’ books, I should judge mine, too. Those are fairly severe constraints, so I’ve decided to cut myself slack in one respect: I’m not going to try to order the books on the list (or any of the entries on any of the other lists) from most important to least important. The granularity of my choices is “on the list” or “not on the list.” Within each list, I’ll order things chronologically, in this case by initial publication date.
For more Books Reviews and Downloads you can go here: Books Category in this blog.
(Follow the links to view more details and download books)
The C++ Programming Language by Bjarne Stroustrup,
Addison-Wesley, 1986 (1 edition), 1991 (2 edition), 1997 (3 edition), 2000 (special edition).
For C++ old-timers, the first edition of this book is the one that started it all—the font of our knowledge. The current edition has swelled to over 1000 pages, including coverage of then non-existent language features like templates, exceptions, and multiple inheritance, not to mention the standard template library, but the first edition—the only edition I’ve actually read cover to cover—was a much more tractable 328 pages. For C++ programmers in the second half of the 1980s, a trip through this book was obligatory, and its influence on the early movers and shakers of C++ is impossible to overestimate. Even now, with a plethora of competing introductory books on C++ available, I recommend that serious developers own a copy of (the current version of) this book, because I consider it the best comprehensive reference on both C++ and how to use it properly.
Effective C++ by Scott Meyers, Addison-Wesley,
I (Scott Meyers) got lucky with this book; it happened to be the right book at the right time. By 1991, lots of programmers had mastered the basics of the language. They could get C++ programs to do what they wanted, but they felt that they were running into problems they should have been able to avoid. This was one of the first books to focus on using C++ as opposed to simply learning it, and it concentrated on helping developers avoid common pitfalls and make the best use of the language’s non-C features (e.g., constructors and destructors, inheritance, virtual functions, per-class allocators, etc.) Furthermore, it did it in the form of specific guidelines. This was unconventional at the time, as the prevailing approach to discussing C++ was to focus on its flexibility. My experience had been that programmers wanted a way to cope with that flexibility, in essence, to be told what to do. So the book told them. “Always do this.” “Never do that.” A generation of programmers took the advice to heart, as did a number of purveyors of lint-like tools. The Gnu C++ compiler even has an option to enable warnings for constructs that violate guidelines in Effective 1 C++. A central feature of the book—one I didn’t grasp until I failed to follow it in my second book (More Effective C++)—was that the Items in the book were short, so they could be read during bus or train commutes, while waiting for meetings to start, or, as I was once told, while going to the bathroom.
Design Patterns by Erich Gamma, Richard Helm, Ralph Johnson, and John Vlissides, Addison-Wesley, 1995. This isn’t a C++ book per se, but it had a profound influence on the thinking about good design in C++, as well as every other object-oriented programming language. It initiated the patterns movement among professional software developers, and it introduced a set of patterns that remains to this day the core of the common patterns 2 vocabulary. If you’re familiar with the Command, Visitor, Decorator, or Singleton patterns—or with the idea of design patterns at all, you ultimately have this book to thank for it.
The patterns in the book continue to spur active discussion amongst the C++
cognoscenti. For example, Herb Sutter wrote about a new approach to Observer in his September 2003 C/C++ Users Journal column, and Andrei Alexandrescu
considered the same pattern in his April and June 2005 C/C++ Users Journal
International Standard for C++, ISO/IEC, 1998 (1st edition), 2003 (2nd edition). Standards documents don’t make riveting reading, but something has to define what is and isn’t C++, and the standard does that. Prior to the standard, the best way to figure out what was valid C++ was to read Margaret Ellis’ and Bjarne Stroustrup’s The Annotated C++ Reference Manual (Addison-Wesley, 1990—commonly known as the ARM), check your code with several compilers, and try to read Bjarne Stroustrup’s mind (possibly using his book as a proxy). The 1998 C++ standard didn’t answer every question (no document can), and it failed to answer some questions its authors thought it did (e.g., must memory 3 for a vector be layout-compatible with a C array? ), but it still represented an enormous unifying force for both implementers and users by serving as the authoritative reference for the language. The 2003 “second edition” was really a bug-fix update, more version 1.1 than 2.0, but still a useful revision of the language’s official specification.
Modern C++ Design by Andrei Alexandrescu, Addison-Wesley, 2001. Templates were really designed to support “containers of T,” but they turned out to be capable of much more. A number of people realized this years before Alexandrescu’s book came out, and, indeed, the STL—part of the 1998 standard—requires implementation techniques far beyond containers of T. But Modern C++ Design was the publication that really blew the template door off its hinges for the C++ community as a whole. So significant was its impact, the current era of C++ programming is named after the book: “modern C++” generally refers to code employing template techniques the book popularized. (Googling newsgroup postings between 1985 and 2000 for “modern C++” yields 662 hits. Googling the same phrase from 2001 to the present yields over 3200 hits.) It’s unrelated to the importance of the book in C++ history, but it’s worth noting that at the time Alexandrescu published it, he was unable to find a compiler that would
accept all the standard-conformant code it contained!