Skip to content

Instantly share code, notes, and snippets.

@Nathaniel100
Created June 23, 2016 08:58
Show Gist options
  • Select an option

  • Save Nathaniel100/5fbad3ef3b4c8119b498efa778a27235 to your computer and use it in GitHub Desktop.

Select an option

Save Nathaniel100/5fbad3ef3b4c8119b498efa778a27235 to your computer and use it in GitHub Desktop.
  1. Express ideas directly in code; §3.2.
  2. Define classes to represent application concepts directly in code; §3.2.
  3. Use concrete classes to represent simple concepts and performance-critical components; §3.2.1.
  4. Avoid ‘‘naked’’ new and delete operations; §3.2.1.2.
  5. Use resource handles and RAII to manage resources; §3.2.1.2.
  6. Use abstract classes as interfaces when complete separation of interface and implementation is needed; §3.2.2.
  7. Use class hierarchies to represent concepts with inherent hierarchical structure; §3.2.4. Section 3.5 Advice 85
  8. When designing a class hierarchy, distinguish between implementation inheritance and inter- face inheritance; §3.2.4.
  9. Control construction, copy, move, and destruction of objects; §3.3.
  10. Return containers by value (relying on move for efficiency); §3.3.2.
  11. Provide strong resource safety; that is, never leak anything that you think of as a resource; §3.3.3.
  12. Use containers, defined as resource handle templates, to hold collections of values of the same type; §3.4.1.
  13. Use function templates to represent general algorithms; §3.4.2.
  14. Use function objects, including lambdas, to represent policies and actions; §3.4.3.
  15. Use type and template aliases to provide a uniform notation for types that may vary among similar types or among implementations; §3.4.5.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment