Day home Documentation
Day odd bits

Coding conventions

These have evolved over many years the two key ones are initial capitalisation of functions/methods and function arguments. As most other identifiers are initially lowercase it makes them stand-out.

Naming conventions

Function namesInitially Capital, camel case. eg. SomeFunction
Function argumentsInitially Capital, camel case. eg. ArgumentOne
Local variablesInitially lower-case, camel case. eg. aLocalVar
Class namesAll uppercase. eg. ACTIONS
ConstantsUppercase with two parts split by underscore. eg. BOOL_ONE
So for example if you were to see foo = BAR.Buz(Fox); you'd know foo was local, Buz was a class-method (not a class variable) and that Fox had come from the surounding function call. If you saw if(bar.buz == FOO_FOX) you'd know that bar was a local instance of a class (ie an object) with buz being a value (not a method) and that FOO_FOX is a constant.

Coding conventions