Scott Myers' More Effective C++
From his book, ISBN#0-201-63371-X
- Distinguish between pointers and references.
- Prefer C++ style casts.
- Never treat arrays polymorphically.
- Avoid gratuitous default constructors.
- Be wary of user-defined conversion functions.
- Distinguish between prefix and postfix forms of increment and decrement operators.
- Never overload &&, || or ,
- Understand the different meanings of new and delete.
- Use destructors to prevent resource leaks.
- Prevent resource leaks in constructors.
- Prevent exceptions from leaving destructors.
- Understand how throwing an exception differs from passing a parameter or calling a virtual function.
- Catch exceptions by reference
- Use exception specifications judiciously.
- Understand the costs of exception handling.
- Remember the 80-20 rule.
- Consider using lazy evaluation.
- Amortize the cost of expected computations.
- Understand the origin of temporary objects.
- Facilitate the return value optimization.
- Overload to avoid implicit type conversions.
- Consider using op= instead of stand-alone op.
- Consider alternative libraries.
- Understand the costs of virtual functions, multiple inheritance, virtual base classes and RTTI.
- Virtualize constructors and non-member functions.
- Limit the number of objects of a class.
- Require or prohibit heap-based objects.
- Use smart pointers.
- Use reference counting.
- Use proxy classes.
- Make functions virtual with respect to more than one object.
- Program in the future tense.
- Make non-leaf classes abstract.
- Understand how to combine C++ and C in the same program.
- Familiarize yourself with the language standards, ARM and the ANSI/ISO
we specialize in Intelligent Business Rule Management Systems (iBRMS) - the same thing that used to be called rulebased systems by the AI companies.
|