|
|
|
|
|
by bitwize
1650 days ago
|
|
I still say they did properties wrong. If you have a property prop, it should synthesize methods prop and prop: and expose them to the user. Then, to get you say [obj prop] and to set you say [obj prop: newVal]. This is a convention widely used in Smalltalk, and is nearly as convenient to use as dot notation. Dot notation in Objective-C makes the dot operator mean two different things; and in one case it takes a bare struct and in the other case it takes a pointer. Utterly weird. But it's a belt onion: done because it was the style at the time. |
|