4 ms·
Sadly, it's not too consistent there. For example, this is OK: [[obj find] doThing] But this will crash on nil: [array addObject: [obj find]] Nop-on
by mikeash 13y ago
Sadly, it's not too consistent there. For example, this is OK:
[[obj find] doThing]
But this will crash on nil:
[array addObject: [obj find]]
Nop-on-nil can be convenient, but without APIs that also nop on nil parameters, it can be a little annoying when you still have to check half the time.