10.1 Dot-syntax abbreviation for simple function calls
The dot syntax that we have shown for getters in Section 4.4, page 42, is an abbreviation for a function call. The first expression is an abbreviation for the second expression:
object.function-name
function-name(object)
The dot syntax used with the assignment operator also is an abbreviation for a function call. The first two expressions are abbreviations for the third expression:
object.name := new-value; name(object) := new-value; name-setter(new-value, object);
You can use the dot syntax as an abbreviation for any function call that takes a single argument and returns a single value. For example, in Section 5.1.3, page 54, we defined the following method:
define method past? (time :: <time-offset>) => (past? :: <boolean>) time.total-seconds < 0; end method past?;
The following two calls are equivalent:
past?(*my-time-offset*); *my-time-offset*.past?;
In the remainder of this book, we use the dot syntax for function calls that return a property of an object (such as the past? property of a <time-offset> instance), and that take a single argument and return a single value.




