Re: Properties and the runtime



On Mar 29, 2009, at 10:21 PM, Luke the Hiesterman wrote:
So, if I declared a property called money and synthesized said property, would [object setMoney:money] and object.money = money compile to the same code? That, of course, implies that we're also inserting property-related code to simple method calls if they happen to correspond with a property.

They would compile to the same code, regardless.

@synthesize synthesizes the implementation of the methods only and that is where the runtime dependency is introduced.

Also, same question for if I declared a property and didn't synthesize (wrote my own getter/setter).

Same thing; the call site remains unchanged.

b.bum

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@xxxxxxxxxxxxxxx)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/maillists%40codeha.us

This email sent to maillists@xxxxxxxxx

...



Privacy