• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: A Data Object in Cocoa
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: A Data Object in Cocoa
      • From: "Michael Ash" <email@hidden>
  • Prev by Date: Re: A Data Object in Cocoa
  • Next by Date: Re: Any nice way to quit a background/helper app?
  • Previous by thread: Re: A Data Object in Cocoa
  • Next by thread: Re: A Data Object in Cocoa
  • Index(es):
    • Date
    • Thread