Type names should always be lower_snake_case. This includes all types: structs, classes, typedefs, traits/interfaces, enums, etc.
my_new_type := class
Interfaces should be adjectives where possible, such as printable, enumerable. Where adjectives don’t seem right, append _interface
to the name instead.
my_new_thing_interface := interface
All other names should be PascalCase. Modules, member variables, parameters, methods, and so on.
MyNewVariable:my_new_type = …
- Name parametric types t or thing, where thing explains what the type is supposed to represent. For example:
Send(Payload:payload where payload:type)
You’re sending some parameterized data,Payload
, of anypayload
type. - If there’s more than one parametric type, avoid using single letters, such as
t
,u
,g
- Never use
_t
suffix.