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: Quincey Morris <email@hidden>
- Date: Sun, 24 Jan 2016 17:48:41 -0800
- Feedback-id: 167118m:167118agrif8a:167118sE9uFcZHzC:SMTPCORP
On Jan 24, 2016, at 17:34 , Alex Zavatone <email@hidden> wrote:
>
> A prefix of _ is already used by the compiler to indicate the internal ivar backing properties so, what convention should be used for private properties?
That's kinda a whole different discussion. In Graham’s case, the properties were already private, but they just happened to have been exposed in the public header file. Presumably, they would keep the same names when moved to the implementation file.
In general, use of naming conventions is a personal opinion that we’re never going to reach consensus on. I happen to be at the unpopular end of this — I’ve never used a syntactic naming convention for variables, other than the forced “_” for backing variables that correspond to synthesized properties — and it’s pretty lonely down here on the bendy end of the tree branch.
_______________________________________________
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