Foreword
This is a remarkable book, but it wasn't until I
had nearly finished reading it that I realized just how remarkable
it is. This could well be the first book ever written for people
who are already familiar with C++—all of C++. From language features to
components of the standard library to programming techniques, this
book skips from topic to topic, always keeping you slightly off
balance, always making sure you're paying attention. Just like real
C++ programs. Class design bumps into the behavior of virtual
functions, iterator conventions run up against name lookup rules,
assignment operators sideswipe exception safety, compilation
dependencies cross paths with exported templates. Just like they do
in real programs. The result is a dizzying maelstrom of language
features, library components, and programming techniques at once
both chaotic and magnificent. Just like real programs.
I pronounce GotW such that it rhymes with "Gotcha," and
perhaps that's fitting. As I compared my solutions to the book's
quizzes against Sutter's answers, I fell into the traps he (and
C++) laid before me more often than I'd like to admit. I could
almost see Herb smiling and softly saying "Gotcha!" for each error
I made. Some may argue that this proves I don't know much about
C++. Others may claim it demonstrates that C++ is too complex for
anyone to master. I believe it shows that when you're working in
C++, you have to think carefully about what you're doing. C++ is a
powerful language designed to help solve demanding problems, and
it's important that you hone your knowledge of the language, its
library, and its programming idioms as finely as you can. The
breadth of topics in this book will help you do that. So will its
unique quiz-based format.
Veteran readers of the C++ newsgroups know how
difficult it is to be proclaimed a Guru
of the Week. Veteran participants know it even better. On
the Internet, of course, there can be only one guru each week, but,
backed by the information in this book, you can reasonably hope to
produce guru-quality code every time you program.
Scott Meyers
June 1999
|