Re: Obj-C - your thoughts on hiding data members?
Re: Obj-C - your thoughts on hiding data members?
- Subject: Re: Obj-C - your thoughts on hiding data members?
- From: Uli Kusterer <email@hidden>
- Date: Thu, 28 Jan 2016 15:51:53 +0100
On 27 Jan 2016, at 12:30, Dave <email@hidden> wrote:
> I find the “_” very difficult to see and also I tend to think of it as “Apple Reserved”, which I think it used to be?
Still is, for *methods* so for selectors/properties. However, a single underscore is fine for instance variables backing a method, and in fact is the default when auto-synthesizing. And it's also not in violation of the C standard's rules about underscored and double-underscored identifiers (see e.g. here for a good summary of those http://stackoverflow.com/questions/228783/what-are-the-rules-about-using-an-underscore-in-a-c-identifier).
Cheers,
-- Uli Kusterer
"The Witnesses of TeachText are everywhere..."
http://stacksmith.org
_______________________________________________
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