- Snake case
- Camel case (preferred)
- Camel case starting with underscore (if the name has already been used)
- Camel case starting with DOUBLE underscore (unused parameters)
- Pascal case (public methods)
- Pascal case starting with underscore (private / protected methods)
- Camel case starting with underscore
- Camel case (public fields)
- Camel case starting with underscore (private / protected fields)
- Pascal case
- Pascal case
- Snake case (uppercase)
if (myCondition || myOtherCondition) {
show_debug_message("This is good");
}
while (myCondition) {
show_debug_message("This is good");
}
You can use namespaces as prefix. The prefixes should start with lower case. Also, it is allowed to use an underscore after the namespace prefix. The only rule here is that you have to be consistent.
Example:
// Without namespace
enum CarColors {
Red,
Blue,
Green
}
// With namespace
enum nwCarColors {
Red,
Blue,
Green
}
// With namespace (optional underscore separation)
enum nw_CarColors {
Red,
Blue,
Green
}