Advertisement
Membership
Login
ACCU Buttons
Search in Book Reviews
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.
I vaguely remember having seen an earlier edition of the C book and that I thought at that time that it was reasonably good. You may wonder why I wanted to review the two books at the same time. Too many recent books I have seen from this publisher have been poor or worse. I had hoped to mitigate the adverse review Programming with C++ deserves with a more favourable review of its companion book.
This is a book about the style of C++ that is best described as 'A Better C'. The author spends an entire chapter on C style strings (arrays of
char). He later implements his own rather poor version of a string class. I will not waste your time with a full commentary but I think you may get a sense of the problem from his conversion operator. His interface includes:
operator char*() const;
and there is a private data element declared as:
char * buf;
The implementation of the conversion operator is:
operator char*() const { return buf; };
This provides write access to supposedly hidden data in an object through a const member function. As there is also a data member that depends on the length of the encapsulated array of char this is about as bad an example of programming as you can get.
Like the previous book this one has nothing on any recent feature of C++ (except a brief excursion into templates). The author's comments on protected data members makes it clear that he has no understanding of large scale programming (for which C++ was originally designed). He blandly assumes that the author of a class will be responsible for its subclasses (derived classes in the terminology of C++ rather than Smalltalk/Eiffel).