Re: A Data Object in Cocoa
Re: A Data Object in Cocoa
- Subject: Re: A Data Object in Cocoa
- From: Andy Lee <email@hidden>
- Date: Sat, 10 Jan 2009 15:33:42 -0500
On Saturday, January 10, 2009, at 12:39PM, "email@hidden" <email@hidden> wrote:
>For what it's worth Anguish et al states (p99) that Apple reserves the
>right to change "private" instance variables that begin with an
>underscore and no prefix.
On Saturday, January 10, 2009, at 02:40PM, "email@hidden" <email@hidden> wrote:
>I agree that it is confusing, or meaningless, but I thought it might
>have contributed to the _ misconception.
>A Google for - anguish "underscores and usage" - will show the passage
>I referred to.
It sounds like the risk is that Apple could rename one of their _ivars so the new name collides with one of your _ivars that previously was okay. You would quickly discover this the next time you compile, but I assume existing users of your app would find it suddenly crashes after their last OS update. Anguish et al. recommend mitigating this risk by using a unique prefix in addition to the underscore.
I personally don't worry too much about it. I doubt Apple would change the name of an ivar from _forFutureUse13 to _name.
--Andy
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden