Author:Stanley B. Lippman, Josée Lajoie and Barbara E. Moo
Audience: Intermediate programmers
Reviewer: Mike James
A new edition of a classic C++ book deals with the shock of the new - C++ 11 that is. Can a classic catch up?
This is a book that has helped many a C++ programmer over the years and so it is difficult to be cruel. However, despite the addition of some icons in the margin to tell you which bits of the book are about what, the overall feel is of an old fashioned book. This is not necessarily a criticism.
There are two things to know about this book before we move on to consider some details. The first thing is that this is a very big book. This makes it physically difficult to read and unlikely that any reader is going to read it as a sequential task. The second is that this is not for the beginner. It probably isn't even for the programmer with a little C++ experience. To get the most from this book you have to have some basic concepts of programming and object-oriented programming in particular.
The book starts off with a quick look at how you might run C++ and it is the command line compiler that is references - both GNU and Microsoft's. This isn't a book that considers IDEs or frameworks in particular. This is a book focused on the C++ language.
In the first chapter we have a lightning tour of the basic ideas including flow of control and classes and its all over in 25 pages. This is more like a reference work presenting the basic ideas as quickly as possible rather than a tutorial.
From here the first part of the book marches on through the basics - strings, expressions, statements, functions and classes. All covered in detail in the style of a friendly reference work. There are explanations and some self test questions (without answers) but it best serves as a refresher or a clarifier rather than a deep explanation.
Part II of the book is about the C++ library - I/O, containers generics and so on. Part III moves on to "Tools For Class Authors". This isn't about tools in the usual sense but simply ideas that help with the task of working in an object oriented way. It deal with topics such as the copy constructor, overloading, object oriented philosophy, generic templates and so on.
Part IV is about advanced topics but most C++ programmers might want to argue with the "advanced". This section deals with specialist library functions - tuples, random and regular expressions. Next we have exception handling, name spaces and inheritance multiple and virtual.
Overall the book tackles C++ as a modern object-oriented language and doesn't spend too much time on its roots in C. For such a thick book it presents all of the ideas in a fairly terse manner. The reason it is so thick is that it tends to be exhaustive in its treatment of the possible variations of a topic There are places where it reads almost like a cookbook. The examples presented are never very long and in most cases this is an advantage as they serve to illustrate fairly precise points.
As already mentioned. this is not a book for the complete beginner. It best suits the intermediate programmer or the programmer moving from another language. Many of the sections are great for making sure you have understood a topic or to get a quick refresh of something you once knew well or thought you did. What it doesn't do is cover some of the system specific ideas, such as programming under Windows or Linux for that matter. It also doesn't explain the ways in which C++ can be misused if you are not careful. While all of the programs it presents are well written. it doesn't prepare you for the way C++ is often written in the real world.
Recommended if you have more than one C++ book already.