In Objective C language one don't "invoke a method on object" it "passes the message to object". Between these to concepts "calling a method" and "message passing", there is no major difference in implementation but they are different in execution.
In other language like C, the method name is refer to a block of code in receiver class by compiler. In Objective C language the receiver of message is identified at run time with the help of object on which the message being passed. That means at compile time message passing system do not check if there is any receiver of message to receive it or not. It can happen that the method for the message is not implemented in receiver class. In this case it will raise an exception.
0 Comment(s)