CodingRules » History » Version 3
Jules Waldhart, 2016-05-30 16:10
some stuff about naming
1 | 1 | Jules Waldhart | h1. Coding Rules |
---|---|---|---|
2 | |||
3 | An unordered list of stuff we would like devs to follow |
||
4 | |||
5 | 3 | Jules Waldhart | h3. Naming |
6 | |||
7 | * ClassesAreCamelCase with first letter capital, also are all types (typedef, enum, struct,...) |
||
8 | * methodsAreCamelCase with first letter lowercase |
||
9 | * _attributeStartWithUnderscore and is camelcase |
||
10 | * localVariable or local_variable, first letter lowercase |
||
11 | * avoid calling @a=function(1.0,6,false,true)@, declare local variables with descriptive name for the parameters: @a=function(step_size,iteration_nb,enable_XYZ,multi_thread)@ |
||
12 | * put enums in namespaces or in classes. |
||
13 | |||
14 | h3. Unimplemented stuff |
||
15 | |||
16 | 2 | Jules Waldhart | * not implemented functions: put an @assert(false);@ in it, it will abort in debug mode, and do nothing in release. (instead of a print or whatever, which is totally unclear) |
17 | 1 | Jules Waldhart | * but mainly, avoid to commit unimplemented functions. |