Wiki

Clone wiki

Fairlight / Coding Conventions

Coding Conventions

  • Monkey Strict-Mode is used for all files:
    • Always specify the type of all variables, function return values and function parameters
    • All function call parameters must be enclosed in brackets
    • A function that does not return Void must end with a Return statement
  • If possible Monkey shortcuts are used:
    • # instead of :Float
    • % instead of :Int
    • ? instead of :Bool
    • $ instead of :String
  • Naming conventions are
    • Constants are all-caps case (eg: ALLCAPS)
    • Globals, functions, classes, methods and properties are MixedCase (eg: MixedCase)
    • Fields, locals and function parameters are camel case (eg: camelCase)
  • Private will never be used. Why to hide things? We assume each developer knows what he is doing.
  • Indention is done using 4 spaces
  • Filenames are lowercase (eg: filename.monkey)

Updated