On May 12, 2010, at 2:50 PM, aaron smith wrote:
To me the ivars in a class are already private (unless they're exposed through a @property). So putting _ivar is like declaring private twice.
A naming convention for instance variables isn't to indicate that they're private, it's to indicate that they're instance variables (and have very different scope than local variables or method parameters.) It can be confusing to try to understand a block of code and not know whether 'foo' has method or object scope, without searching all the way back to the top of the method for a declaration of 'foo'.
Most Java (and C++) code I've seen uses some sort of naming convention for instance variables too.
—Jens_______________________________________________ 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