Re: Objective-C Instance Variable Names
Re: Objective-C Instance Variable Names
- Subject: Re: Objective-C Instance Variable Names
- From: glenn andreas <email@hidden>
- Date: Thu, 3 Apr 2008 13:42:34 -0500
On Apr 3, 2008, at 1:29 PM, Hamish Allan wrote:
On Thu, Apr 3, 2008 at 7:08 PM, Robert Claeson <email@hidden
> wrote:
C. Instance variables are usually named like "theName",
"theAddress" or
something else that makes sense if there's the risk of mixup
between ivars
and locals.
Myself I use "myName" for instance variables and "theName" for static
variables. (I guess I'd probably use "globalName" if circumstances
ever dictated.)
Here's another vote for using "myName" - after all, when you add an
instance variable to a class in IB it is "myVariable". Plus if you
ever directly try to access another objects ivars it looks wrong
grammatically "someObject->myStuff" (using this guideline would make
"its" a bad prefix for stuff not meant to be publicly visible).
Glenn Andreas email@hidden
<http://www.gandreas.com/> wicked fun!
quadrium2 | build, mutate, evolve, animate | images, textures,
fractals, art
_______________________________________________
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