nullable
I find this syntax rather confusing:
- (void)doSomething:(nullable void (^)(NSArray * _Nullable transactions))successBlock
failure:(nullable void (^)(NSError * _Nullable error))failureBlock;
...not only because of the duality between nullable and _Nullable, but also because, while having the same intent, they are not interchangeable.
As found in Nullability and Objective-C:
- use
nullablelike you would use assertions __nullableis the old name ofnullablebetween Xcode 6.3 and 7.0- use
_Nullablewhere you can useconst
This makes little sense in the example above, since I have yet to see void defined as const void. Is there and even better version of nullable that could be used interchangeably?
_Nonnull, _Null_unspecified
Same puzzle.