CoCoALib:CodingGuidelines

From CoCoAWiki
Jump to: navigation, search

As requested by Kreuzer, here is a short-list of the "most important" recommendations among the 101 listed in "C++ Coding Standards" by Sutter and Alexandrescu -- the numbers in brackets correspond to the numbering in that book.

  • (6) KISS: strive for correctness, simplicity, and clarity.
  • (8) Don't optimize prematurely.
  • (14) Prefer compile-time errors to run-time checks.
  • (33) Prefer minimal classes to all-in-one classes.
  • (41) Keep data members private.
  • (59) Do not use "using" in header files.
  • (68) Use CoCoA_ASSERT liberally.
  • (71) Make your functions/procedures fully exception safe.
  • (84) Prefer STL algorithms over explicit loops.