Naming conventions [formatting.naming]
Always use the same identifier style (case, underscores) as the declaration.
Enable --styleCheck:usages, and, where feasible, --styleCheck:error.
Refforref objecttypes, which have surprising semanticstype XxxRef = ref Xxxtype XxxRef = ref object ...
func init(T: type Xxx, params...): Tfor "constructors"func init(T: type ref Xxx, params...): TwhenTis aref
func new(T: type Xxx, params...): ref Tfor "constructors" that return aref Tnewintroducesrefto a non-reftype
XxxErrorfor exceptions inheriting fromCatchableErrorXxxDefectfor exceptions inheriting fromDefect