I was delighted to see that this book is now in a second edition. The original was an excellent study for C++ programmers...
...Unless you are sure you understood the first edition, you can probably benefit from reading this new one.
I was delighted to see that this book is now in a second edition. The original was an excellent study for C++ programmers. It consisted of fifty aphorisms heading essays expanding on them. Quite correctly Scott believes that you should not only be given good advice, but also helped to understand when to ignore it. Many programmers would do much better even if they just slavishly followed his advice.
Two of the original fifty items have been replaced. No. 32'Use enums for integral class constants' has gone. This is largely because the C++ FDIS includes a facility for in class provision of values for
constinteger variables. Some considered the
enummechanism as a hack. Personally I disagree (I much dislike the language change), but the new mechanism has the advantage that you can specify the exact integer type want for a manifest constant. Scott has replaced the item with 'Postpone variable definitions as long as possible.' The traditionalists will be up in arms, but I side with Scott.
The other retired aphorism is'Plan for coming language features' which has been replaced with 'Familiarize yourself with the standard library.' Obviously the value of the earlier aphorism has gone down (though there are many people using compilers that still have to implement many features) and I hope that the value of the replacement is beyond question.
Some of the other items have been rephrased and a couple have been transposed into a more logical sequence. All the items have been substantially reworked to take account of the ways in which the language (not only in content but in our understanding of how to use it to best advantage) has developed over the last six years.
If you think you understand how to use C++ and have not read the original you certainly should read this edition. Unless you are sure you understood the first edition, you can probably benefit from reading this new one.