31 lines
875 B
Markdown
31 lines
875 B
Markdown
# Names
|
|
|
|
_Names_ are user-defined strings that name defined items. All names (variable
|
|
names, function names, etc.) follow the same rules.
|
|
|
|
Names are UTF-8 strings. The following values are _excluded_:
|
|
|
|
- Any reserved keyword (in total)
|
|
- Any reserved symbol or operator (in total)
|
|
- Any whitespace character
|
|
- `.`
|
|
- `"`
|
|
- `,`
|
|
- `\`
|
|
- `[` or `]`
|
|
- `(` or `)`
|
|
|
|
## Convention
|
|
|
|
- Variables use `lower_snake_case`
|
|
- Functions use `lower_snake_case`
|
|
- Generic Types use `UpperCamelCase` but prefer single letters such as `A`.
|
|
- Data Types, aliases, etc. use `UpperCamelCase`
|
|
|
|
## Name Conflicts
|
|
|
|
- Variables may have the same names as functions.
|
|
- Functions/infix may _not_ share names. No overloaded functions.
|
|
- Type classes may declare members with the same name, but if some type has an
|
|
instance of each conflicting type class, names cannot be known without
|
|
qualification.
|