Variables in Nox are snake_cased or ALL_CAPS.
snake_cased
ALL_CAPS
x = 42 name = 'Amir' grid_size = 9
(It's not forbidden to use camelCase variables, but it's not considered idiomatic.)
camelCase
Type names in Nox are StartCase.
StartCase
To summarize:
If a name starts with a lowercase char, it's considered an identifier (e.g. a variable, a function name, or a function parameter).
If a name starts with an uppercase char and includes at least one lowercase char, it's considered a type name (e.g. True, Result, etc.)
True
Result
If a name starts with an uppercase char and does not include a lowercase char, it's considered a variable, typically used to declare constants.
Last updated 5 years ago