Skip to content
This repository was archived by the owner on Nov 9, 2017. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,19 @@
* Don't use `@synthesize` unless the compiler requires it.
* Instance variables should be prefixed with an underscore (just like when implicitly synthesized).

## Control Structures
## Expressions

* Use object literals, boxed expressions, and subscripting over the older, grosser alternatives.
* Comparisons should be explicit for everything except `BOOL`s.
* Prefer positive comparisons to negative.
* There shouldn't be a space between a cast and the variable being cast.

``` objc
NewType a = (OldType)b;
```

## Control Structures

* Always surround `if` bodies with curly braces if there is an `else`. Single-line `if` bodies without an `else` should be on the same line as the `if`.
* All curly braces should begin on the same line as their associated statement. They should end on a new line.
* Put a single space after keywords and before their parentheses.
Expand Down