On 3 Apr 2008, at 19:58, Rob Napier wrote:
2. Leading "m" makes you look like a C++ programmer and other ObjCprogrammers will laugh at you. You can take that for what it's worth, but it's worth keeping in mind if you're going to work on large projects with other programmers. "Other ObjC programmers will laugh at you" seems to be acommon mechanism for keeping large projects sane. Java guys use theircompiler. We use peer pressure. Which you think is a better way to enforcegood practice will determine whether you are happier as a Java or ObjC programmer.
As a Smalltalk programmer (although I don't get to do much Smalltalk programming these days) I stick with the following naming convention from the Smalltalk days:
A. Arguments are usually called something like "aName", "anAddress" etc. B. Local variables are usually named in their generic form, eg "name".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.
"Usually" and "makes sense" are the key phrases here.Using leading underscores or even worse, hungarian notation, gives me sore eyes and makes the code hard to read.
On a side note, I learned C++ back in the late 80's from a guy named Dr Bjarne Stroustrup. He didn't use hungarian or leading underscores. I believe both conventions were introduced much later by Microsoft, if my memory serves me right.
Robert
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ 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 [EMAIL PROTECTED]