• 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: Wincent Colaiuta <email@hidden>
  • Date: Mon, 3 Sep 2007 21:30:55 +0200

El 3/9/2007, a las 20:52, Laurence Harris escribió:

An even better solution would be to rename your instance variables with a standard naming convention that clearly identifies them as instance variables. Since they're also referred to as member variables, a lot of people prefix their names with an "m":

Depends on what you mean by "a lot"; if you mean "multiple people" then you're right. But "some" would probably be a less misleading choice because this pattern is most definitely only in minority use in the Objective-C world (where they are called instance variables, not member variables, in any case).


Seems of dubious value to embed this information in your variable names when the compiler is (obviously) capable of warning about possible ambiguities, and the predominant use of accessors means that direct instance variable manipulation is a fairly rare thing anyway (think Key-Value Coding, and Objective-C 2.0 properties).

Cheers,
Wincent

_______________________________________________
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


  • Follow-Ups:
    • Re: warning: local declaration hides instance variable
      • From: Laurence Harris <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>)

  • Prev by Date: Re: warning: local declaration hides instance variable
  • Next by Date: Getting rid of Obj-C "may not respond to" warning
  • Previous by thread: Re: warning: local declaration hides instance variable
  • Next by thread: Re: warning: local declaration hides instance variable
  • Index(es):
    • Date
    • Thread