Related products:
|
C
Accelerated C++: Practical Programming by Example
Format: Paperback
Author: Andrew Koenig
ReleaseDate: 15 January, 2000
Publisher: Addison-Wesley Professional
Rating:
Excellent, extensive, and concise tutorial
By stark contrast, in "Accelerated C++", Koenig and Moo have beautifully written an eminently useful introductory tutorial to C++. Far too many computing texts are so bloated that they are nothing short of a criminal waste of trees. There is no blathering about other languages, or marketing, or grandstanding about C++ or anything else. They are concise throughout, and absolutely precise. The text is crisp, clear, to the point, and anticipates intelligent questions. Study every line of it all the way to the end, where they build and use a smart pointer that handles reference counts, a useful exercise in getting comfortable with OOP rigmarole. (One would be forgiven for thinking the language has a problem when a base class declares as friends classes that derive from it, but it all makes sense of course. ) Everything neatly comes together in a sweet example in the last chapter.
A nit: a line in Ch. 13 is awkward ("says that the fact that", p. 228). If one were to nit pick with most texts one would never be done, but that's it with this one. So it's a complimentary nit I came across while nitting. Well maybe one more, a common solecism, also in Ch. 13 (p. 233): "a derived class is inherited from a base class" doesn't make sense, whereas "a derived class inherits from (or derives from, or is derived from) a base class" does. There is usually more to a derived class than what it inherits from a base class; the extra certainly is not inherited from a base class. So it is not quite right to say a derived class is inherited from a base class.
They push the "this != &other" test as sometimes necessary for assignment operators to be correct, instead of the more elegant and automatically exception safe copy-construct followed by swap idiom. The copy constructor needs to be built anyway, and then, what if operator& were overloaded in a base class?
The larger question of whether computational scientists should be bothered with much of C++ is another matter, and an important one, along with the impact of Rube Goldberg OOP constructs on high performance computing. In this introductory tutorial, K&M rightly steer clear of all this. They don't even mention binary I/O.
If you are intent on learning C++, this splendid text is the one to learn it from. Vladimir and Estragon even make a cameo appearance. I could go on. Let's not.
.
C++ for Java developers
As a result, the way of programming in C++ has evolved to being more library-centric, that is, more API-based. Although Koenig does not mention Java in this book, clearly the richness of the Java API has influenced the evolution of C++. Koenig gives a well-paced introduction to C++ as it is really practiced, using the most commonly used library classes. This seems exactly the right approach, and will certainly be of great use to developers who are already experienced in Java programming.
After three years of using this book...
It does not stand for a rapid visit through all the C++ topics, nor does it stand for the kind of programmer that should use the book. The "Accelerated" in the title stands for bypassing the part of programming where the programmer builds all his own tools.
The philosophy of this book is to teach the usefulness of C++ for solving problems. It does this by reaching into the rich toolbox that comes with every compiler. This philosophy is over and against the one that emphasizes the capabilities of C++ in making tools from scratch. The reader is taught to employ the powerful C++ templates--which makes for accelerated and useful C++ programming. This book is not about C programming with objects thrown in. Nor is it about the abstract principles of C++ as compared to other languages.
I don't know of another C++ book with this philosophy and style; it is fantastic.
Early on, the authors introduce standard templates which make data management easy. They teach the associative maps, vectors, strings, I/O streams and other C++ tools. It is designed to allow the programmer to move swiftly into solving real-world problems -- versus the traditional language route that starts with scaffolding construction. Because this book promotes the language as a tool, it would be a good C++ introduction for programmers who already know Java and C#.
I have been programming in C and C++ since 1991. I lost my first C++ book a few years ago, and I replaced it with this one. I am glad for the change! This book is packed with useful examples and detailed explanations--and it is a handy reference as well. Each C++ topic is explained in wonderful detail (more detail than I recall getting in college).
By using this book, beginners will learn correctly, and old-hats will learn to enjoy the language more deeply. This C++ book is a new favorite. It certainly reads better than Strousrup's, "The C++ Programming Language" -- which is a critically important book, just written poorly.
For a light and whimsical introduction to C++ following the traditional methods, see the pleasant "Learning C++" by Neill Graham. .
|
|