Book Review: C++ Coding Standards

 

A number of years ago, reading Koenig's and Moo's Ruminations on C++ [1] I made a wish for more of the same, updated to reflect current C++ practice. My wish has come true. The book C++ Coding Standards: 101 Rules, Guidelines, and Best Practices by Herb Sutter and Andrei Alexandrescu [2] is an indispensable book for all serious C++ programmers.

Sharp tools must be handled with care. C++ is such a tool providing exemplary expressiveness without sacrificing one iota in the efficiency of the generated code. This remarkable feat comes however at a price. C++ programmers are given more than enough rope to hang themselves; several times in a single line of code.

Sutter’s and Alexandresu’s C++ Coding Standards comes here to rescue providing 101 rules and guidelines for writing safe, readable, maintainable, and efficient code. The advice is organized into 12 different parts covering organization issues, design and coding style, functions and operators, class design, modules, templates, error handling, the standard template library, and type safety.

Most rules are C++ specific and objectively true: no space is wasted on generic programming advice that can be found in a number of other books, or subjective style guidelines that differ from site to site. The authors really know what they are talking about, and therefore write in an authoritative manner that suits the book’s purpose. The structure of each element: summary, discussion, examples, exceptions, references allows readers to tailor their reading pace according to their needs. In a summary, this is an indispensable book for all serious C++ programmers.

  1. Andrew Koenig and Barbara Moo. Ruminations on C++: A Decade of Programming Insight and Experience. Addison-Wesley, 1996.

  2. Herb Sutter and Andrei Alexandrescu. C++ Coding Standards: 101 Rules, Guidelines, and Best Practices. Addison Wesley, 2004.
    Cover image

Comments   Toot! Share


Last modified: Sunday, November 14, 2004 4:41 pm

Creative Commons Licence BY NC

Unless otherwise expressly stated, all original material on this page created by Diomidis Spinellis is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.