Re: Turning off spurious C warning in XCode ?
Re: Turning off spurious C warning in XCode ?
- Subject: Re: Turning off spurious C warning in XCode ?
- From: Eric Wang <email@hidden>
- Date: Mon, 24 Nov 2003 16:08:52 -0500
on 11/24/03 9:46 AM, Alastair Houghton at email@hidden wrote:
> You should take a look at Apple's naming guidelines, here:
>
> http://developer.apple.com/documentation/Cocoa/Conceptual/
> CodingGuidelines/index.html
>
> If you look closely, you'll find that they say that instance variables
> should *not* have '_' on the beginning because that notation is
> reserved for use by Apple.
I don't understand why Apple recommends this. I find this naming convention
very convenient for accessor and mutator methods. Unlike with method names,
the compiler will warn you if you've overridden a variable with the same
name, so I don't see much harm in using underscores to prefix instance
variable names.
Eric Wang
P.S. On the same page, Apple also recommends developers to "Explicitly
declare instance variables either @private or @protected." Do people really
follow that guideline? Most of the code I've read doesn't have access
specifiers for instance variables.
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.