Method invocation: [object makeDrink:@"Milk" with:@"Chocolate"];
Variable access: id theDrink = object.drink;
Its the difference between a verb (action) and noun (variable), and its expressed using different syntax. I can know at a glance when code is bracketed, I'm invoking an action, and when I'm using dot-syntax I'm accessing a variable.
The difference between object.drink
and [object drink]
become immediate. What's so hard about that??
by Ken — Feb 20
Method invocation:
[object makeDrink:@"Milk" with:@"Chocolate"];
Variable access:
id theDrink = object.drink;
Its the difference between a verb (action) and noun (variable), and its expressed using different syntax. I can know at a glance when code is bracketed, I'm invoking an action, and when I'm using dot-syntax I'm accessing a variable.
The difference between
object.drink
and
[object drink]
become immediate. What's so hard about that??