|
|
|
|
|
by mikeash
4585 days ago
|
|
Because... it's not? Declare a plain getter method: -(id)foo;
Call it with dot syntax: id foo = obj.foo;
Works fine. Now declare it as a property: @property id foo;
Call it without dot syntax: id foo = [obj foo];
Works fine. They are completely unrelated and just introduced at the same time. You could take dot syntax out of the language without affecting properties in the least. You could take properties out of the language without affecting dot syntax in the least.(There is one exception to this, and that is the part where dot syntax understands and calls custom getter/setter names for properties. But that is the only place where they even touch, and it certainly doesn't mean they're somehow integrated.) |
|
However that's a pretty arbitrary definition, since properties pre-date the introduction of that directive.