'method' vs. 'message' vs. 'function' vs. '???'

后端 未结 11 958
北荒
北荒 2020-12-24 12:59

I recently asked a question about what I called \"method calls\". The answer referred to \"messages\". As a self-taught hobby programmer trying to phrase questions that don\

11条回答
  •  庸人自扰
    2020-12-24 13:58

    The "Message" term can refer to sending a message to an object, which is supported in some programming languages and not others.

    If the object supports the message, then it will execute some code. Otherwise it will just ignore it. This is a more dynamic approach than an explicit function/method call where the object must support that function.

    Objective-c, I believe, uses this messaging approach.

提交回复
热议问题