-
Notifications
You must be signed in to change notification settings - Fork 401
Code rules
Mikulas Florek edited this page Oct 21, 2017
·
10 revisions
- Quality is the most important feature.
- Write for readers - code is read and debugged many more times than it is edited.
- Consistency - look at the way things are already done - formatting, filenames, structure, ...
- Keep it simple, stupid.
- YAGNI
- Templates, C++11, ... use whatever you think is reasonable if it works on all supported platforms (At least Win, Mac, Linux, even though Mac has not been implemented yet, it probably will be).
- Asserts should not be triggered by data and invalid data can not cause crashes.
- Using clang-format is preferred, there is a config for it