• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Obj-C - your thoughts on hiding data members?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Obj-C - your thoughts on hiding data members?
      • From: Alex Zavatone <email@hidden>
References: 
 >Obj-C - your thoughts on hiding data members? (From: Graham Cox <email@hidden>)
 >Re: Obj-C - your thoughts on hiding data members? (From: Greg Parker <email@hidden>)
 >Re: Obj-C - your thoughts on hiding data members? (From: Alex Zavatone <email@hidden>)

  • Prev by Date: Re: Obj-C - your thoughts on hiding data members?
  • Next by Date: Re: Removing Observers eats up memory
  • Previous by thread: Re: Obj-C - your thoughts on hiding data members?
  • Next by thread: Re: Obj-C - your thoughts on hiding data members?
  • Index(es):
    • Date
    • Thread