IAP GITLAB
Changes
Page history
Add the correct names for the various coding cases (Pascal, camel, etc.)
authored
Nov 04, 2020
by
Remy Prechelt
Show whitespace changes
Inline
Side-by-side
Coding-Conventions-and-Guidelines.md
View page @
9fd93de0
...
...
@@ -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 c
ase
```class LikeThis```
-
Class methods are
lower
camel
c
ase
```LikeThis::doSomething()```
-
Data members are
lower
camel
c
ase 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 PascalC
ase
```class LikeThis```
-
Class methods are camel
C
ase
```LikeThis::doSomething()```
-
Data members are camel
C
ase 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
...
...
...
...