Item 23: Prefer Non-Member Non-Friend Functions to Member Functions
To increase encapsulation.
- Least member functions = minimum interface
- Encapsulate more = easier to change implementation
- Use
namespaceto help you organize classes and non-member non-friend functions- You may split stuff of the same
namespaceinto pieces, but a class must be defined in its entirety
- You may split stuff of the same
