Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 383d36eefc
Fetching contributors…

Cannot retrieve contributors at this time

59 lines (39 sloc) 1.019 kb
-----------
Line length
Aim for ~120 max. Unless you have a good reason.
That is out to -------------------------------------------------------------------------------------------------------->
-----------
Brace and indentation style
public function foo()
{
...
}
class Foo
{
public var x : Int;
public var y : Int;
public var z : Int;
public function new(x,y,z)
{
this.x = x;
this.y = y;
this.z = z;
}
...
}
or
public function mini() { ... }
class Mini {public var x : Int; public var y : Int; public var z : Int;
public function new(x,y,z) { this.x = x; this.y = y; this.z = z; } }
If the function or class is taking more than 2-3 lines, don't use the mini style.
-----------
Naming conventions
ClassNameIsCamelCase
methodsAreLowerCamelCase
variables_are_snaky_case
compactvarsoksometimes (mostly as locals and really common stuff)
CONSTANT_OR_GLOBAL
If you aren't using a parameter you can call it "_" instead.
-----------
Other things
Don't nest ternaries.
Jump to Line
Something went wrong with that request. Please try again.