Lexical scoping is used to locate the closest lexically-enclosing variable or object binding for the name. It is an error to try to assign to an object, a formal parameter, or to a variable declared without the var keyword. Normally, a message whose name begins with a letter is written in named prefix form, while a message whose name begins with a punctuation symbol is written in unary prefix form or in infix form. The semantics of method lookup is described in section 2.7 . Resends, a special kind of message send, are described in section 2.8 .
Syntactic sugar exists for several common forms of messages.
If the message takes only one argument, the trailing parentheses can be omitted. This syntax may suggest that the first argument is more important than the others, but in fact the semantics is still that all arguments are treated uniformly, and any subset of the arguments might be dispatched at method-lookup time. Other syntactic sugars support message sends written like assignments. Semantically, they are all messages. This syntax is the same as for an object declaration except that no object name is specified.