Variables
Variables in Nox are snake_cased or ALL_CAPS.
x = 42
name = 'Amir'
grid_size = 9(It's not forbidden to use camelCase variables, but it's not considered idiomatic.)
Type names in Nox are 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.)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
Was this helpful?