On Apr 5, 2009, at 5:10 PM, Brad O'Hearne wrote:
1. I get the gist of trying to prevent developers from accidentally hiding variables -- but is this really a major problem? Other than this, is there a compelling reason to keep this warning in tact, and change variable parameter variable names to make the warning go away?
Yes. Most -- not all, but most -- Objective-C programmers tend to shy away from various prefix/suffix solutions for marking instance variables, preferring to go with more english like names. Apple uses _ to indicate "internal, don't touch", but not with 100% consistency.
Argument names are typically somewhat descriptive of their purpose -- newOrigin, notificationName, userInfo -- or totally generic, while remaining descriptive -- aSize, anError, etc...
2. How do you get Xcode to not produce this warning?
Don't. You'll thank yourself for not doing so after spending a few hours wondering why an iVar didn't get updated only to find that a parameter hid the iVar.
b.bum _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com