-
Notifications
You must be signed in to change notification settings - Fork 0
Style Guide
Malachi edited this page Nov 2, 2024
·
3 revisions
Document v0.1
These guidelines apply to core library conventions under our complete control, with only minor influence from 3rd parties:
class and struct MUST be pascal case, unless an inner class or struct.
inner class or struct SHOULD be pascal case, otherwise MUST be snake case.
functions (excluding constructors and destructors) MUST be snake case.
enum names SHOULD be pascal case, otherwise MUST be snake case.
non-class enum enumerator MUST be CAPS case.
class enum enumerator SHOULD be snake case.
typedef/using MUST be either snake case or pascal case
namespace MUST be snake case and shorter than 15 characters
These guidelines apply to library conventions directly interacting with and reflecting 3rd parties code, such as wrapper code.
Term | Context | Description |
---|---|---|
CAPS case | My unofficial term for Screaming snake case | |
Camel case | [1] | All words except first capitalized i.e. helloWorld
|
Kebab case | [1] | All words lowercase, separated by hyphen i.e. hello-world
|
Pascal case | [1] | All words capitalized i.e. HelloWorld
|
Screaming snake case | [1] | All words uppercase, separated by underscore i.e. HELLO_WORLD
|
Snake case | [1] | All words lowercase, separated by underscore i.e. hello_world
|