- Make classes and functions easy to use correctly, hard to use incorrectly.
- Obey the principle of least astonishment.
- Avoid gratuitous incompatibilities with the built-in types.
- Use const whenever possible
- Avoid duplicating code.
And the for the third principle listed, "When in doubt, do as the ints do."
This is from material and notes taken at the 2002 C++ Seminar in Boston during the session about Library Design and the C++ Standard Library by Scott Meyers.
These still seem like sensible principles to keep in mind as one develops code.

No comments:
Post a Comment