5 ms·
Not a bad intro to ObjC message syntax. Even though the article has few mistakes. Most notably ObjC syntax does not have functions that are called, it has mess
by mmariani 15y ago
Not a bad intro to ObjC message syntax. Even though the article has few mistakes.
Most notably ObjC syntax does not have functions that are called, it has messages that are sent to objects and classes. In the end all messages are "translated" to C function calls to objc_msgSend().
Everything makes sense after you read the proper documentation. Which in this case is http://developer.apple.com/library/mac/documentation/Cocoa/Reference/ObjCRuntimeRef/ObjCRuntimeRef.pdf http://developer.apple.com/library/mac/documentation/Cocoa/R...
- kentnguyen 15y agoThanks for pointing that out, nevertheless I guess using the similar concept to PHP/JS makes the user relate to the transition better. I did read that Apple doc when I first starting out but it was overwhelming to me at that time and it backfired. I was more discourage to learn Objective C after seeing the doc.
- RandallBrown 15y agoI've always found it easier to just explain the messages by calling them functions, otherwise people will often get wrapped up in their previous conceptions of messages in programming.