Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <blockquote> <p>At first I assumed "messages" were just a different name for method calls,</p> </blockquote> <p>Yes and no. "Messages" are the Smalltalk and Objective-C terminology for method calls. The thing is, it's not only the terminology that differs, but the actual implementation too. There are 8 different possible combinations for matching the terminology, the syntax and the implementation, like this:</p> <pre><code>+-------------------+----------------------+--------------------+ | terminology | syntax | implementation | +-------------------+----------------------+--------------------+ | "method call" | Simula (o.method()) | static binding | non-virtual C++ methods +-------------------+----------------------+--------------------+ | "method call" | Simula | dynamic binding | +-------------------+----------------------+--------------------+ | "method call" | Smalltalk ([o meth]) | static binding | +-------------------+----------------------+--------------------+ | "method call" | Smalltalk | dynamic binding | +-------------------+----------------------+--------------------+ | "message passing" | Simula | static binding | +-------------------+----------------------+--------------------+ | "message passing" | Simula | dynamic binding | +-------------------+----------------------+--------------------+ | "message passing" | Smalltalk | static binding | +-------------------+----------------------+--------------------+ | "message passing" | Smalltalk | dynamic binding | Objective-C +-------------------+----------------------+--------------------+ </code></pre> <p>The combination the language designer choses is just a matter of taste.</p> <blockquote> <p>I'm still uncertain why the language designers would choose a messaging system over a more direct method calling system</p> </blockquote> <p>Because it has some advantages, such as runtime interposition and introspection -- one can query and modify the behavior of classes, methods and objects at runtime. In the implementation of Objective-C, this have been done in a way such that it is very cheap, it has almost no overhead.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload