Author: TRCLoop (@trcloop) Idea and Definitions: Salad (@salad.txt) message
Naming Everything (Case)¶
Formats¶
| Naming Convention | Example | Description |
|---|---|---|
| camelCase | myVariableName | First word lowercase, subsequent words capitalized for readability. |
| snake_case | my_variable_name | All lowercase with underscores separating words. |
| SCREAMING_SNAKE_CASE | MY_VARIABLE_NAME | All uppercase with underscores, typically used for constants. |
| PascalCase | MyVariableName | Each word starts with a capital letter. |
camelCase¶
camelCase is a naming convention where the first word is lowercase and each subsequent word starts with a capital letter, improving readability (e.g., myVariableName).
snake_case¶
snake_case is a naming convention where words are written in lowercase and separated by underscores for clarity (e.g., my_variable_name).
SCREAMING_SNAKE_CASE¶
SCREAMING_SNAKE_CASE is a naming convention that's based on snake_case where all letters are uppercase and words are separated by underscores, typically used for constants (e.g., MY_VARIABLE_NAME).
PascalCase¶
PascalCase is a naming convention where each word starts with a capital letter and no separators are used, often for class names (e.g., MyVariableName).
Content¶
Variables¶
Local (l!) and Object (o!) variables use camelCase or snake_case.
Constant (Global) Variables use SCREAMING_SNAKE_CASE.
Functions¶
Functions follow a similar pattern to variables, they use camelCase or snake_case
UI Elements (UITree)¶
UI Elements in the UITree use PascalCase.
Tables¶
Not yet defined. Use kebab-case for now. (eg. my-test-table)
Reason¶
By standardizing the basic naming of everything, it's easy to see what is what. (eg. MAX_VALUE is surely a constant)