... | ... | @@ -70,11 +70,11 @@ Important rules, and notable differences are summarized here: |
|
|
|
|
|
### Class, Namespace, Enum, Function, and Variable Naming Conventions
|
|
|
|
|
|
- Free functions are small letters only like ```make_bar(Wine const& wine, Beer const& beer)```
|
|
|
- Classes are named in upper camel case ```class LikeThis```
|
|
|
- Class methods are lower camel case ```LikeThis::doSomething()```
|
|
|
- Data members are lower camel case with a "_" suffix. ```LikeThis::parameterOne_```
|
|
|
- Namespaces are small letters only like ```namespace this_namespace```
|
|
|
- Free functions are in "snake case" (lower case letters with underscores) only like ```make_bar(Wine const& wine, Beer const& beer)```
|
|
|
- Classes names are in PascalCase ```class LikeThis```
|
|
|
- Class methods are camelCase ```LikeThis::doSomething()```
|
|
|
- Data members are camelCase with a "_" suffix. ```LikeThis::parameterOne_```
|
|
|
- Namespaces are in "snake case" i.e. small letters only like ```namespace this_namespace```
|
|
|
- Enums follow class rules, e.g. ```enum class ThisIsAnEnum {one,two, three};```
|
|
|
- Define and use enums as locally as possible, as strongly namespaced as feasible (best inside their host class)
|
|
|
- Do not use abbreviations, if not absolutely necessary
|
... | ... | |