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: Dave <email@hidden>
- Date: Tue, 26 Jan 2016 10:47:40 +0000
Hi,
> Yeah, the ivar for an @property called myThing is _myThing and we can know that by looking at it with our eyeballs. How do we extend that type of visual exposure of information of the “thing” being inspected in a similar manner?
>
> Do we have any standards for this?
>
> If not, should we create some?
There are no standards AFAIK and you will never get everybody to agree a “standard” naming convention, I have my own scheme though:
Entry Parameters to Methods are prefixed the “the”, local Variables are prefixed “my”, properties are prefixed “p”, Ivar’s “m”, constants “k” and I always try to give some clue as to the type of the data in the variables, e.g. myNameDict, myAddresssAddress, etc.
Cheers
Dave
_______________________________________________
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