Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!cwjcc!ukma!nrl-cmf!ames!ai.etl.army.mil!mike
From: mike@ai.etl.army.mil (Mike McDonnell)
Newsgroups: comp.lang.c++
Subject: book review: J. Berry, C++ Programming
Message-ID: <185@ai.etl.army.mil>
Date: 23 Sep 88 02:03:32 GMT
Reply-To: mike@ai.etl.army.mil. (Mike McDonnell)
Organization: USAETL, Fort Belvoir, Virginia
Lines: 43


I have mixed feelings about this book.  It takes a measured and
intelligent pace in introducing the C programmer to C++.  The examples
are interesting and relevant and the writing is clear and to the point.
Berry also is careful to point out features of C++ that can cause
problems and reasonable techniques you can use to minimize difficulties.
But.

The code is so full of errors that it is a rare example that does not
have something wrong with it.  Kernighan and Ritchie state in the
preface to The C Programming Language that "All examples have been
tested directly from the text, which is in machine-readable form."  This
was done over 10 years ago and produced a classic.  I still remember
being awed at the sheer correctness of the programs in K&R since it was
not then the norm to find this.  Nowadays this should be expected by the
reader.  Stroustrup used this technique too, of course, even testing his
code on several different systems.  From the book being reviewed, the
publisher's page says "..every precaution has been taken in the
preparation of this book."  I do not agree.

That being said, I have to admit that I enjoyed finding as many errors
as I could, and I was forced to learn the gdb+ debugger (I use the GNU
"g++" compiler) which was not a bad thing to do.  I guess I know enough
C and am used to debugging enough so that the process of working my way
through the book was actually made more enjoyable by the errors.  This
would be a disaster for a beginner though.  

Unfortunately, Stroustrup's book is not a good book to learn from
either, despite its correctness.  Bjarne has too complicated a mind
to make a simple exposition, the strength of Berry's book.  If the
errors are corrected, I think that Berry's book can be a good book for
beginners while Stroustrup will remain best for more advanced students.

One final thing; the examples are excessively dependent on System V
Unix.  The string function strtok() is used in several examples and is
not on my system (4.3BSD on a VAX).  Also the final chapter "Using C++
on a Unix System", which was written by a different author, William
Leggett, only made me wish that I had the rich suite of IPC and
synchronizing capabilities that System V has.  But I couldn't run the
code.  Are you listening, Berkeley?
-- 
Mike McDonnell at the U.S. Army Engineer Topographic Laboratories, Bldg. 2592
Fort Belvoir, VA 22060-5546   TEL:(202)355-2724   ARPA: mike@ai.etl.army.mil