Message Passing Syntax

The syntax used to indicate a message is slightly different in different languages. In C++, Java and Object Pascal the receiver is followed by a period, then the message name and arguments in the form of a function call.

In Smalltalk and Objective-C the receiver is followed by a space, then the message name. If a message requires arguments a colon is used after the message name, and keywords must separate any arguments. A period is used to indicate the end of a statement in Smalltalk.

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