News for hackers. Stuff that matters.
Re:Avoid Null Checks by Replacing Finders with Tellers by SigmundA on Monday June 17, 2013 @04:14PM (#5895635)
Surprised no one has mentioned objective-c's sending message to nil which is relied on throughout apple frameworks which is basically what the article says is a lot of work to implement but given to you for free in obj-c: http://stackoverflow.com/questions/156395/sending-a-message-...

C# kinda does this for nullable types, it is referred to as null lifting.

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.