Re: Understanding the "declaration of instance variables in the interface is deprecated" warning.
Re: Understanding the "declaration of instance variables in the interface is deprecated" warning.
- Subject: Re: Understanding the "declaration of instance variables in the interface is deprecated" warning.
- From: Uli Kusterer <email@hidden>
- Date: Thu, 04 Jun 2015 18:13:20 +0200
On 03 Jun 2015, at 20:30, Mark Wright <email@hidden> wrote:
> I believe Uli is mistaken on this point, I’m pretty sure Apple actually recommends prefixing your own ivars in this manner (hence the way auto property synthesis works), it’s *methods* that generally shouldn’t be prefixed with an underscore (but I do that on occasion too since the naming is generally specific enough to render collisions vanishingly unlikely).
We’re fully in agreement that ivars’ names don’t matter, while methods are important WRT avoiding the underscore. The issue is just that if you want to make a private *property* (as opposed to a private ivar), you can’t use an underscore prefix, because that would implicitly generate a getter *method* with an underscore.
Cheers,
-- Uli Kusterer
“The Witnesses of TeachText are everywhere...”
http://zathras.de
_______________________________________________
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