[Home Page] - [Reviews Main] | |
|
C++ Primer 3rd ed by Stanley B Lippman & Josee Lajoie Highly Recommended |
| ISBN: 0 201 82470 1 Publisher: Addison-Wesley Pages: 1237pp Price: £28-99 |
| Categories: beginner's c++ |
| Reviewed by Francis Glassborow in C Vu 10-4 (May 1998) |
On the other hand Josee Lajoie is one of my favourite people. I have
happily worked under her direction and contributed my small bit to the
discussions of Core 1 subgroup of WG21/J16. The addition of her as a co-
author of this new edition immediately moved the title from 'I must have a
look at that some time.' to 'I must look at that now.' I have not been
disappointed. That is not to say that I always agree with the authors.
For example, I never use C style comments in my code except to comment out
code (the use of preprocessor directives to do this does not make the
excluded block visible, commenting out code changes its colour). I do not
use friend to provide global overloads of operators. I
greatly prefer the new idiom for assignment that, among other things
supports rollback or commit in an exception-throwing environment.
I mention all the above so that you understand where I am coming from.
This book is a massive introduction to C++. It has been written with an awareness of modern C++ rather than the older versions that most other books use. It starts using the powerful C++ Library right from the start and does not waste time demanding that you learn older and largely superseded methods that traditional C++ imported from C. Good programming (multi-file, header sentinels, stub functions etc.) are in use from chapter 1. The authors cover object-based and procedural programming as well as pure OOP.
My caveats above are very much personal alternatives and possibly counsels of perfection. Let me give you another example. On page 159 the first sentence on the conditional operator is:
The conditional operator provides a convenient notational alternative to
simple if-else statements.
I once made a similar claim and was rightly corrected by having my
attention drawn to the difference between an expression and a statement.
The conditional operator evaluates to a value, if-else
statements do not. For the inexperienced reader the book's statement is
acceptable but readers need to note that some degree of simplification
exists in the presentation. This is the kind of place that I would like to
see a footnote or an endnote.
Its target readership is people with some programming background though not necessarily in C. Like all good books for newcomers to C++ you must be willing to work at understanding the authors. They write clearly and have a well-considered approach to introducing the reader to C++ but that does not excuse the reader from doing their bit by thinking about what they read. You may think that is obvious but many people seem to think that you can read a book on programming with the same casual attitude that you apply to reading a novel. Reading books on programming is much more like reading a book on mathematics, you need a paper and pencil or keyboard and text editor readily to hand. You cannot learn to program in the bath. Ideas and insights can come in such an environment but only after you have put in the hard graft.
If you want to learn to program in C++ as it is intended to be used and believe that you have some talent for the subject then this is the best place to start that I have found. Experienced programmers with some understanding of C++ (perhaps based on using a more classical version) might want to skip this one and move straight to Bjarne Stroustrup's The C++ Programming Language 3rd ed but most will benefit from working through both. C++ Primer 3rd ed is not the only book you should read, and you should not consider it as a definitive volume giving the one true way but it is an excellent basis from which to explore alternatives. If you are serious about learning C++, read and study this book. When you have finished you should then start reading and studying other books.
If you are already a competent C++ programmer, having a copy of this book to hand might solve the problem of the workshop pest who constantly wants instant answers from you. Just tell them that they need to be familiar with the contents of this book before it is worth your going into detail. If they are willing to work through C++ Primer 3rd ed they just might be worth some of your time to progress beyond it.
Thanks to the authors we have an introductory text that sets a standard for others to aspire to.
Lippman
C++ Gems (Programming Pearls from the C++ Report) by S Lippman [Recommended] (Reviewed Sep 1996)
C++ Primer 3rd ed by Lajoie & Lippman [Highly Recommended] (Reviewed Jul 1998)
Essential C++ by Stan Lippman (Reviewed May 2000)
Inside the C++ Object Model by Stanley Lippman (Reviewed Jan 1997)
To link to this review, please use the URL: http://www.accu.org/bookreviews/public/reviews/cp/cp001565.htm
Copyright © The Association of C & C++ Users 1998-2000. All rights reserved.