Skip to content

Latest commit

 

History

History
26 lines (19 loc) · 1.01 KB

CodingRules.wiki

File metadata and controls

26 lines (19 loc) · 1.01 KB

SubEtha Coding Rules

  * Pascal-like {} positions
 Braces go on a line by themselves, outdented from their contents.

  * Use explicit references to  *this*
 Refer to member variables and member methods:  this.doSomething(); This doesn't work when inner classes refer to member variables in outer classes, but it's a rare enough case that you can ignore this rule.

  * No member variable prefix
 Do not prefix member variables with a letter (ie, do not use mFoo). Just refer to it as this.foo in your code.

  * There is a space between if and (
 For if, while, for, etc... there is a space between the statment and the (. ie: "if (", "while (", "for (".

  * Code-as-literature
 Code should read like English, and when it doesn't read like English, it should have comments that are written in English.  Be liberal with punctuation and grammar.  Somebody has to read this stuff.