0

What is the difference between getting and setting properties via dot notation and via sending message?

... = anObject.property;
... = [anObject property];

anObject.property = ...;
[anObject setProperty:...];

Is the dot notation only a syntactic suger for message sending and the code is compiled exactly the same or there are some differences with nil handling, performance, etc?

Maciej Jastrzebski
  • 3,674
  • 3
  • 22
  • 28

1 Answers1

4

Is the dot notation only syntactic sugar for message sending and the code is compiled exactly the same?

Yes, they're exactly the same.