Jump to content

Null object: Difference between revisions

Fixing an error in Objective-C semantics
(Fixing an error in Objective-C semantics)
Line 284:
NSLog("object is nil");
}</lang>
An interesting thing is that in Objective-C, it is possible to send a message to <code>nil</code>, and the program will not crash or raise an exception (nothing will be executed; anand exception<code>nil</code> iswill raised,be butreturned itin doesplace not interruptof the programusual return value).
<lang objc>[nil fooBar];</lang>
 
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.