I've just been bitten by an annoying bug that was made obscure by the "send message to nil is ok" behaviour in Objective-C.
I've seen http://stackoverflow.com/questions/156395/sending-a-message-to-nil, and the consensus seems to be 'thats how we roll' in Objective-C.
Now, maybe I don't have enough experience in Objective-C, but it seems like it would be useful to trap this, because I can't think of a good reason why this should be happening most of the time. However, It could just be a coding idiom I'm not used to yet.
So other than checking for nil everywhere like so:
assert( object != nil ); [object message];
Is there a way to make the runtime trap this condition, and warn when
object is nil?