(This is a first draft)
- I strongly prefer hard tabs, and set my editor to render them four columns wide.
- I do, however, understand the rationale behind using four-wide soft tabs, and will expand on this in a later draft.
- BSD Kernel Normal Form is the one true indentation style.
// Number literals should only be boxed when backwards compatibility requires them.
NSNumber *one = @(1);
NSNumber *two = @(2);
NSNumber *three = @(3);
// Single-line array literals should have a space inside each bracket and no terminating comma.
NSArray *anArray = @[ one, two, three ];
// Multi-line literals should use a terminating comma and no spaces.
NSArray *anotherArray = @[
one,
two,
three,
];
// Dictionary literals look the same, but with a space between the keys and values
NSDictionary *aDictionary = @{ @"foo": one, @"bar": two, @"baz": three };
NSDictionary *anotherDictionary = @{
@"foo": one,
@"bar": two,
@"baz": three,
};