ACCU Home page ACCU Conference Page
Search Contact us ACCU at Flickr ACCU at GitHib ACCU at Google+ ACCU at Facebook ACCU at Linked-in ACCU at Twitter Skip Navigation

Search in Book Reviews

The ACCU passes on review copies of computer books to its members for them to review. The result is a large, high quality collection of book reviews by programmers, for programmers. Currently there are 1918 reviews in the database and more every month.
Search is a simple string search in either book title or book author. The full text search is a search of the text of the review.
    View all alphabetically
Title:
The ANSI/ISO C++ Professional Programmer's Handbook
Author:
Danny Kalev
ISBN:
0 7897 2022 1
Publisher:
Que
Pages:
365pp
Price:
£36.99
Reviewer:
Bryan Scattergood
Subject:
advanced c++
Appeared in:
12-6

originally reviewed by Francis Glassborow in C Vu 12.3

This book looks promising. As part of Que's Professional series it is aimed at intermediate to advanced C++ programmers. It assumes you are familiar with the language and sets out to cover the changes made to the language during standardisation. Alas, it falls short of the standards such a book should achieve.

The most glaring problem is with the example code. From silly mistakes like the misplaced parentheses in

#define max(x,y) ((x)>(y))?(x):(y)
to design flaws like
string&writeToString(int symbol)
{ ... return *new string; }
The examples are riddled with problems. One particularly appalling example is used to show that copy constructors can be defined in terms of assignment. Simplifying slightly, the code given is
class Person {
  char *name;
public:
  Person&operator=(
        const Person&other){
    if(&other != this){
      delete [] name;
      name = new char[strlen
        (other.name)+1];
      strcpy(name, other.name);
    }
    return *this;
  }
  Person(const Person&other)
    { *this = other; }
};
No destructor is defined, and the copy constructor will cause
delete[]
to be called on an uninitialised pointer. Asking for exception-safe code would clearly be too much, but such basic detail should be correct in any C++ book, let alone one aimed at advanced programmers.

If we ignore the flaws in the examples, the accompanying text also suggests that the author may not fully understand his subject. A substantial discussion about when it is safe to call member functions from a constructor does not include pure virtual functions. The only example given of template-parameters to templates is

vector<vector<char
*>>
which is nothing of the sort. The placement and nothrow variants of
operator new
are discussed without any mention of user-defined versions, or of the purpose of the matching versions of
operator delete
. The chapter on the STL completely ignores the performance guarantees that the library provides.

The author's writing is dry and sometimes opinionated. Even when I understood the points he was trying to make, some of his explanations served only to confuse; I was sometimes reduced to checking the point in Meyers, Sutter, or Koenig, which reminded me that technical material does not have to be tedious.

The book fails my fundamental test, namely "would I leave it lying around at work." The problems with the examples alone are enough to stop me doing that. It is possible that a rewrite could produce a decent book, but I cannot recommend it as it stands -especially since the publishers seem to think it should command a premium price.

Before the author claims that Bryan is just supporting the ACCU establishment, he should note that, mostly, second reviews of books originally reviewed by me are ones that significantly disagree with me. Indeed it is my policy to give preference to such reviews. The only reason I am publishing this review is because the author insisted that a less 'biased' person review it. - Francis Glassborow