I am just curious, I am writing some notes for a friend and am not sure how to best refer to whats happening here …
[myObject display];
-
access the object by calling display
-
access the object by messaging display
-
access the object by sending the display message
-
other …
Just want to make sure I get the terminology right.
gary
Strictly speaking the call “sends the
displaymessage tomyObject“.However, it’s equally understood, and often simpler, to say “call the
displaymethod ofmyObject“.In most cases the expressions are equivalent – but the first reveals more about what is going on, and where things may differ (the object may intercept the message and do something else with it other than call the method).