|
|
24 of 26 people found the following review helpful:
5.0 out of 5 stars
The only other C++ book you would need, June 4, 2004
There are plenty of C++ books out there. When it comes down to it, one would really need two books on C++. Well, this is the second book you need; with the first one being any of many classics including the first volume of this book. Just when you think you have read or have a reference to all the C++ topics, Eckel and Allison come out with their continuation of a classic - volume two of Thinking in C++. Exceptions, Templates, STL, Design Patterns, Multiple Inheritance, concurrency and parallel programming are just some of the main topics covered in this book. With the book being over 800 pages, one can imagine how deep each of these topics must have been covered. Exceptions grab you right off the bat. Just when you think you know all about exceptions, the authors throw you a curve ball with "Exception Specification", and how to handle the "unexpected". You are blown away by the true control that C++ gives you. . Strings, along with examples given to depict the string class in full - as part of the standard template library (STL) of C++, begin the authors' discussion of the Standard Template Library. Vectors, sets, lists and many other features of the STL have their own dedicated section which talks about generic containers. The authors set the stage for STL by describing the containers as: "Container classes are the solution to a specific kind of code reuse problem. ...A container class describes an object that holds other objects..." The authors then continue on to cover the very important and broad topic in C++ - containers. Examples after examples are used to convey the details and the tricky parts of the C++ STL. The key by reading this chapter is to portray and teach efficient techniques to common problems using the generic container classes. Not only the reader can learn most of what s/he needs to know about containers in this book, a small introduction is also given to show how to actually write a generic container - a linked list. The example is simple, yet powerful in conveying to the reader the ins and outs of writing generic containers. Speaking of generic, generic algorithms are covered very well in this book. All of the algorithms currently in the C++ library are covered with an accompanying example for each one. A special attention is given to the use of function objects as the means of customizing these algorithms. "A function object is an instance of a class that overloads operator(), the function call operator. This operator allows an object to be used with function call syntax" Probably the simplest and the easiest definition of algorithm complexity theory is given in this book. The authors make the concept so easy to understand that even a non-programmer or mathematician can understand the reason and the complexity of complexity theory! Templates are probably my favorite topics in this book. Next to the C++ template "bible" by Vaqndervoorde and Josuttis, this book is the best source for generic programming and templates. The authors cover the three main topics of templates well: 1) Templates with types as parameters 2) Templates with compile-time constant as values 3) Templates with other templates as values. The authors start with small and simple examples and build on top of them. Templates are generally a difficult topics to cover and to convey, but the authors do a great job in depicting the examples and teaching the reader how templates work and to create powerful programs with them. The advanced topics in this book (multiple inheritance, runtime type identification, design patterns, and concurrent programming) are my favorite topics. Multiple Inheritance is covered in depth, better than any other book that I have seen out there. The authors do caution the readers regarding the difficulties and the pitfalls of multiple inheritance, but they also explain with examples, pictures, etc... how a developer can overcome these difficulties (using upcast to resolve naming conflicts for example or avoiding the diamond-shaped inheritance tree). Concurrency and concurrent programming is one of the more difficult things to do in C++. Threads are usually used to achieve such task, but it takes practice and lots of sleepless nights to debug threaded programs and resolve deadlock issues with threads. The advantages of threads (ability to run multiple tasks concurrently, very low context switching relative to processes, allow better code organization and the added convenience to the user specially for graphical user interface tasks) are depicted and shown thru a number of examples. The most important part of this section is how the authors use examples to show what the right way of doing something is as oppose to simply putting bunch of source code together to fill in the blank pages. The examples are priceless to me and very beneficial to any programmer. All and all, Bruce Eckel and Chuck Allison did a great job putting this book together. The topics covered are very beneficial to any serious C++ programmer or anyone wishing to become one. I particularly like the examples and "how-to's" given throughout the book as they are a valuable source when I am stuck with a programming challenge.
|