-
Notifications
You must be signed in to change notification settings - Fork 18
Home
ZacNugent edited this page Aug 2, 2017
·
2 revisions
- Unary operators should have no whitespace between themselves and the argument.
- Colons (
a:b), powers (x^yand family), type declarations (a::T) and dots (a.b) should have no whitespace between operators and arguments. - All other operators should have surrounding white space, except:
- When the arguments of a colon (
:) expression are binary expressions with no surrounding brackets, no white space should be used. (i.e.a + b * c:d->a+b*c:dor(a + b * c):d
- When the arguments of a colon (
- Ternary conditional expressions should have (and in future versions must have) whitespace between arguments and operators.
- There should be no whitespace between the opening bracket and first item.
- There should be no whitespace between the final item and the closing bracket.
- Unless a single item
Tupleis being constructed, there should not be a comma before the closing bracket.
- Commas should have no preceding whitespace and a single trailing space except:
- When separating items in curly brackets, where there should be no surrounding white space i.e.
{a,b}.
- When separating items in curly brackets, where there should be no surrounding white space i.e.
- Lines exceeding 92 characters should be split.
- There should be no white space at the end of lines.
- There should be one blank line at the end of a file.
-
Functions should be lowercase. -
DataTypes andModules should be capitalised (camel-case).