This is another text from an academic author. His target readers are students who have already gained a good working knowledge of programming (I find very suspect his suggestion that those who have this by learning Java should be able to cope by supplementing their study of the early chapters with a good C++ text). He assumes that these students will be those who intend to go on to make a career of software development. His intention is to develop a good approach to design issues.
On the credit side is his use of such aspects of C++ as the STL, his coverage of such things as factory methods and the numerous summary statements. Each of the latter is placed boldly in a box so that it stands out from the main text.
On the negative side is the lack of namespace and the quality of some of the advice.
Let me take a couple of examples:
On page 91:
Define both a copy constructor and an assignment operator for any class that is to be passed as a structure.
Not only do I find that advice overkill, but I also think it misses a much more important point in that classes that are not intended to have instances passed by value should have, at a minimum, a
privatedeclaration of those functions.
On page 78:
Use pointers to represent classes
In an exception-generating environment this advice coupled with the author's advice to use
newto create instances is a recipe for large scale memory leakage.
Bad advice mixed with good and then offered to students (particularly when many of them will have no access to mentoring from anyone nearly as capable as the author) is dangerous. Experience allows us to select good from bad, but it is in the nature of students that they lack the experience to tell the difference. Initially they tend to take this kind of material as a divine dictate and follow blindly. When they discover some of the errors they swing to the other extreme and throw the lot away.
Rather than pursue this book further when it appears to be such a mixture of good and bad, I have arranged for Kevlin Henney to do a more comprehensive review as much of the content lies in his areas of expertise.
Watch this space