Use encapsulation and data-hiding where possible.
This means:
- The scopes of variables/data should be reduced as much as possible.
- Avoid the use of globals.
The pre-processor should only be used for two things:
Macros are hard to debug.
See the section on Cross-platform support.
- All platform specific code should be in
platform/
. - Do not use a platform specific functions and types outside of
platform/
- Instead, create a cross-platform wrapper around it.