Skip to content

Coding Style

Man-Long (Norman) Wong edited this page Oct 22, 2022 · 3 revisions

Programming language

We use C++ with the C++11 standard as the programming language for the code.

Naming convention

It is recommended to use:

  1. UpperCamelCase for class names
  2. lowerCamelCase for methods and functions
  3. CAPITALIZED_WITH_UNDERSCORES for constants
  4. lowercase_separated_by_underscores for variable names
  5. UpperCamelCase for file names
  6. lowercase_separated_by_underscores for folder names

Indentation

4 spaces of indentation, and no tab characters should be used.

Comments

A single line above the code is recommended. Add full stop at the end of each comment.