- A message is always sent to an object named the receiver which may be the result of other message sends.
- Unary messages are messages that do not require any argument. They are of the form of
- Binary messages are messages that involve two objects, the receiver and another object and whose selector is composed of one or more characters from the following list: +, --, *, /, |, &, =, >, <, ̃, and @. They are of the form:
receiver selector argument
- Keyword messages are messages that involve more than one object and that contain at least one colon character (:).
- They are of the form:
receiver selectorWordOne: argumentOne wordTwo: argumentTwo
- Rule One. Unary messages are sent first, then binary messages, and finally keyword messages.
- Rule Two. Messages in parentheses are sent before any others.
- Rule Three. When the messages are of the same kind, the order of evaluation is from left to right.
- In Smalltalk, traditional arithmetic operators such as + and * have the same priority. + and * are just binary messages, therefore * does not have priority over +. You must use parentheses to obtain a different result.