Re: Objective-C Instance Variable Names
Re: Objective-C Instance Variable Names
- Subject: Re: Objective-C Instance Variable Names
- From: Richard Somers <email@hidden>
- Date: Mon, 7 Apr 2008 08:31:21 -0600
On Apr 5, 2008, at 7:17PM, Quincey Morris wrote:
The most common situation where I run into local/instance variable
name conflicts is setter methods. If the property and the instance
variable are both 'whatever', it makes sense to me to call the
setter argument variable 'newWhatever', because that is in fact what
it is.
This agrees with my experience. I have switched to simply using
"newValue" for the setter argument variable. In other words I
literally use "newValue" for the setter argument variable for all
setter methods. Works well so far.
I also am training myself to pay attention to the color coding XCode 3
provides to distinguish ivars from local vars.
Regards,
Richard
_______________________________________________
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