Re:Avoid Null Checks by Replacing Finders with Tellers
by mikeash on Monday June 17, 2013 @04:18PM
(#5895669)
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.
C# kinda does this for nullable types, it is referred to as null lifting.