On Mar 19, 2012, at 11:48 , Matt Neuburg wrote:

> As long as we're just dreaming up our own linguistic world, I'd suggest that 
> instead of "owning" we say "owning-copying". I've never liked the way "copy" 
> implies "retain". The word "retain" tells you something very important, 
> namely that this thing has an elevated retain count and needs release later. 
> It's not very nice to expect a beginner to know that "copy" *also* means 
> that. If you're copying, you're taking ownership, and "owning-copying" would 
> remind you of that. m.

"you" == "the class implementor"??

Because I don't think the *client* cares about the ownership of the copy that's 
made.

You're also pointing out a larger area of secondary difficulty: the attributes 
on the @property declaration don't ensure that they're honored by the 
implementation. I have to confess I write non-atomic setters all the time, but 
I never bother to declare the @property as nonatomic. That's at least in part 
because I almost never rely on atomicity at the property level, in code I write 
or frameworks I use, so I don't have to believe the declaration regarding that 
attribute anyway. 

Similarly, when writing a setter for a "copy" property, I'd say it's sometimes 
harder to remember to do the copy at all, than to remember the correct memory 
management.


_______________________________________________

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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

Reply via email to