On Jun 22, 2011, at 3:23 AM, Joanna Carter wrote:

> Hi folks
> 
> Le 22 juin 2011 à 08:58, Ken Tozier a écrit :
> 
>> I just started using @properties this week, so probably don't understand the 
>> nuances, but after looking at Matt's sample code, reading the property 
>> related docs and doing some experimentation, I'm not sure I understand what 
>> problem he's trying to solve. Is he talking about overriding inherited 
>> getters/setters?
>> 
>> With my own very limited experience with properties, it seems to be really 
>> easy to add functionality. Just write the getter/setter yourself. When you 
>> go to use them, they behave exactly like the auto generated ones re dot 
>> syntax, and do whatever cool thing you added.
>> 
>> What am I missing?
> 
> Yes, I would also like to know what Matt is trying to achieve with all those 
> machinations that you can't do with a simple ivar in the class and not 
> bothering to @synthesize. The only time I declare @synthesize and write 
> getters/setters is when I want either a complex getter or setter but not have 
> to bother writing the other.
> 
> Joanna

It’s possible that he wants to inherit the atomic behavior of Apple’s automatic 
synthesized properties. It’s been implied before on the list that the 
synthesized properties use a more efficient implementation of atomicity than 
the typical @synthesized or lock-based approaches.

Charles_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to