Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Object Messaging Terminology?

Tags:

objective-c

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];
  1. access the object by calling display

  2. access the object by messaging display

  3. access the object by sending the display message

  4. other ...

Just want to make sure I get the terminology right.

gary

like image 371
fuzzygoat Avatar asked Dec 30 '25 19:12

fuzzygoat


2 Answers

Strictly speaking the call "sends the display message to myObject".

However, it's equally understood, and often simpler, to say "call the display method of myObject". 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).

like image 62
philsquared Avatar answered Jan 01 '26 11:01

philsquared


You're sending the display message to myObject or you're telling myObject to display.

You're not accessing myObject, you're telling it to do something.

like image 33
Terry Wilcox Avatar answered Jan 01 '26 09:01

Terry Wilcox



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!