0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-12-26 15:33:54 +01:00

Update STYLE.

This commit is contained in:
Jason Volk 2018-01-26 07:58:28 -08:00
parent 69d9d3c062
commit 3c4b0066ec

View file

@ -4,7 +4,7 @@
In the post-C++11 world it is time to leave C99+ behind and seriously consider
C++ as C proper. It has been a hard 30 year journey to finally earn that, but
now it is time. This document is the effective style guide for how Charybdis
will integrate -std=gnu++14 and how developers should approach it.
will integrate -std=gnu++17 and how developers should approach it.
### C++ With Respect For C People
@ -29,6 +29,8 @@ inheritance.
* Creating a structure with a bunch of function pointers, then having a user
of the structure fill in the pointers with their own functionality. -> Think
virtual functions.
* `if` statements that check for errors and `goto` some label at the bottom of
a function under the normal return type. -> Think exceptions.
#### Encapsulation will be relaxed
@ -264,6 +266,8 @@ documentation is applied to code that follows the comment block.
#### Miscellaneous
* Prefer "locality" rather than "centrality." In other words, we keep things
in as local of a scope or file as possible to where it is used.
* new and delete should rarely if ever be seen. This is more true than ever with
C++14 std::make_unique() and std::make_shared().