• 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: warning: local declaration hides instance variable
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: warning: local declaration hides instance variable


  • Subject: Re: warning: local declaration hides instance variable
  • From: Laurence Harris <email@hidden>
  • Date: Mon, 3 Sep 2007 17:14:57 -0400


On Sep 3, 2007, at 4:44 PM, Tron Thomas wrote:

When I'm programming in C++ I'm always in the habit of declaring member variables with an "m_" prefix. Placing an "m" or "m_" before a variable doesn't really seem to be a convention in Objective-C. Most people when they declare an Interface Building outlet don't prefix the outlet name with anything, and the outlets available from Cocoa class don't prefixes either. The outlets basically show up as public instance variables in the class declaration.

It seems inconsistent for some member to have a prefix and some to not have the prefix. For this reason, I tend to avoid prefixing Objective-C member variables that way.

Well, I'd do what I could. If it would benefit me to use such a naming convention I'd use it. If a naming convention made me more productive, I'd use it. (It does, so I do.) Now, if I were writing Obj-C and there were a commonly accepted convention for naming instance variables, I'd use it, but I wouldn't forego something useful just because other Obj-C programmers don't use it.


Larry
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >warning: local declaration hides instance variable (From: Tron Thomas <email@hidden>)
 >Re: warning: local declaration hides instance variable (From: Wincent Colaiuta <email@hidden>)
 >Re: warning: local declaration hides instance variable (From: Laurence Harris <email@hidden>)
 >Re: warning: local declaration hides instance variable (From: Tron Thomas <email@hidden>)

  • Prev by Date: Re: warning: local declaration hides instance variable
  • Next by Date: Re: Adding Help
  • Previous by thread: Re: warning: local declaration hides instance variable
  • Next by thread: Re: warning: local declaration hides instance variable
  • Index(es):
    • Date
    • Thread