Operators as Messages

In some languages, such as Smalltalk or C++, operators can be defined as messages. An expression, such as 3 + 4, is interpreted as the ``+'' message being received by the value 3, with an argument value of 4.

When used in this fashion, the receiver is the left argument, the value to the left of the operator. While the right argument is then used as a parameter for the method.

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