[Home Page] - [Reviews Main] | |
|
C++: The Core Language by Satir & Brown Not Recommended |
| ISBN: 1-56592-116-X Publisher: O'Reilly Pages: 207pp Price: $19.95 |
| Categories: beginner's c++ |
| Reviewed by Sean Corfield in Overload OL17_18 (Jan 1997) |
Satir & Brown aim squarely at introducing C programmers to C++. They focus on what they consider the "core" subset of C++, noting that readers may disagree with their choice of features. C programmers moving up to C++ may not know enough to question the authors selection but experienced C++ programmers will (the very people at whom the book is not aimed!). I found the authors' coding style to be idiosyncratic at best and the ordering of items to be awkward.
For example, when constructors are introduced, member initialiser lists are not mentioned. Eventually they are introduced as an "advanced topic". The authors are not alone in this habit but as far as I am concerned it teaches poor practice and then forces novices to unlearn that later. Why not teach things properly to start with? I could list many other bad habits but the primary one is that const is not used! Shades of Steve Oualline, another O'Reilly author.
In addition to the poor C++ practice, there are numerous small errors--one particularly confusing error is when they show how to ensure overload resolution picks the desired function: having inserted a cast to force selection of one variant, they state that a different variant is actually called.
I have concerns about the authors' knowledge of C as well: they don't seem to have heard of incomplete types and their discussion of encapsulation in C is clumsy and badly illustrated.
The ordering quirks crop up repeatedly: inheritance is introduced before constructors and destructors, references are introduced very late, in my opinion. Then there are some strange assumptions made about their audience, e.g., the detailed discussion about new and delete includes set_new_handler() but many C programmers are uncomfortable enough with pointers to functions that this will just confuse them. In any case, I question whether an introductory C++ book needs to supply as much detail about storage management.
It's not all bad news. Traps for the unwaring are pointed out in many places, e.g., the subtle issues of explicit and implicit constructor calls, and several instances of undefined behaviour are signposted with wording like "the compiler won't detect this for you so be careful".
The quirks of presentation and, especially, the poor C++ mean that I cannot recommend this book, which is a shame because O'Reilly's "nutshell" books are usually very good. It seems doubly unfortunate that O'Reilly should publish two poor C++ books in quick succession (Oualline's being the other - see previous issues of Overload for the ongoing discussion of his book).
To link to this review, please use the URL: http://www.accu.org/bookreviews/public/reviews/cp/cp002009.htm
Copyright © The Association of C & C++ Users 1998-2000. All rights reserved.