Re: Properties vs Instance Variables
Re: Properties vs Instance Variables
- Subject: Re: Properties vs Instance Variables
- From: Kyle Sluder <email@hidden>
- Date: Tue, 26 Apr 2011 21:23:10 -0700
On Tue, Apr 26, 2011 at 9:07 PM, Steve Christensen <email@hidden> wrote:
> I believe it's only necessary if you want to do a straight "@synthesize foo;", which would expect the instance variable to have the same name as the property.
And it's worth mentioning that you can always do @synthesize foo=_foo;
to map a property to an ivar with a different name.
Oh, how I wish Apple made it mandatory to access ivars using the
self-> syntax. Then I'd just name my ivars the same as my properties,
and not suffer the confusion of arguments/local variables, instance
variables, and properties all requiring different naming conventions.
--Kyle Sluder
_______________________________________________
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