How exactly do “Objects communicate with each other by passing messages”?

前端 未结 10 456
无人及你
无人及你 2021-01-30 17:34

In several introductory texts on Object-oriented programming, I\'ve come across the above statement.

From wikipedia, \"In OOP, each object is capable of receivi

10条回答
  •  旧巷少年郎
    2021-01-30 18:06

    Does that code works?

    Anyway you're out of the road...

    Message passing is a way for interprocess communication, one among many others. It means that two (or more) object can only speak one each other by messaging, which should say from who, to who, and what...

    You can see it's very different from shared memory, for example...

提交回复
热议问题