Re: A Data Object in Cocoa
Re: A Data Object in Cocoa
- Subject: Re: A Data Object in Cocoa
- From: "Michael Ash" <email@hidden>
- Date: Sun, 11 Jan 2009 00:46:56 -0500
On Sat, Jan 10, 2009 at 2:40 PM, email@hidden
<email@hidden> wrote:
>
> On 10 Jan 2009, at 19:23, Michael Ash wrote:
>> I don't have whichever book you're referring to so I can't see what it
>> actually says, but your summary makes no sense. Apple can't change
>> *your* ivars. If it means they reserve the right to change their own
>> private instance variables that begin with an underscore and no
>> prefix, well of course, that's what "private" means. That's why you
>> should never directly twiddle another class's ivars. But that has
>> nothing to do with how you should name your own ivars.
>>
> 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.
Guess I'm not used to books being available online yet. Neat.
Anyway, through the fog of poor wording it seems that he's trying to
say that Apple can change the names of their ivars and reserves
anything starting with an underscore for themselves. Except: a) they
don't b) identically-named ivars don't cause binary incompatibility,
mostly c) leaving off the underscore doesn't prevent conflicts
anyway. The advice to use underscore plus a unique prefix will ward
off the remote possibility of a problem occurring due to a conflict,
so that at least makes some sense.
Mike
_______________________________________________
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