Messages are not Function Calls

Back in chapter 1 we discussed the way in which a message is different from a procedure or function call. In particular, a message is always given to some object, which we call the receiver. More importantly, the message and the body of code that will eventually be executed are only loosely related. The action that will be performed in response to the message is determined, at run time, by the reciever. Different receivers can be given the same message, and will perform different actions. A function, on the other hand, is simply a body of code, it does not have a receiver, and the function will always execute the same actions.

[audio] [real] Text to accompany slide02, in Chapter 5 of An Introduction to Object-Oriented Programming