Tim Bailey

C++ Design

Technical Report, 2005—2006


 


Description

This report was written as a resource for a series of postgraduate seminars on C++ software design (originally delivered in April 2005). It examines idiomatic design with a focus on writing intuitive code that is easy to use right and hard to use wrong. Key concepts include:
  • Avoiding interface bloat and excessive inheritance; designing minimal and complete interfaces.
  • Enforcing correct interface use with access specifiers, scope rules, polymorphism, and const-correctness.
  • Automating resource management via the "resource acquisition is initialisation" idiom.
  • Strategies for designing reusable code.


Download

Full paper [pdf] (143 kb, 14 pages)
Source code [zip] (7 kb)



[Tim's Homepage]