Interesting (somewhat off-topic) discussion. I just wanted to inject that I've recently been writing some Ruby code, which uses the underscore convention for identifiers. At first it felt really strange using the underscore identifier style. However, I very quickly came to prefer it. It actually does make a difference in readability and flow.

Ruby has an interesting mix of CamelCase for class names and underscore_style for method names. So you have lines that look something like:

MyClass.some_method

or

self.some_method

This seems to be an interesting compromise to what might otherwise look very bizarre like:

MY_CLASS.some_method

or

myObject.some_method

In any case, I still use the "conventional" style of whatever language I'm coding whether that is CamelCase, underscore_style, or SomeMixture.of_both. To me the worst case is to have mixed styles in a single language that goes against whatever standards the language sets forth.

I agree that consistency is king. This is especially true when trying to adhere to pragmatic principles that make heavy use of code generators (like EOGenerator and similar tools).

One side note on the getValue() vs. value() accessor convention in WO. Some may recall that this convention is a holdover from it's Objective-C history. Accessing a getter in Objective-C looks something like:

NSString *myName = [object name];

not

NSString *myName = [object getName];

This later statement would have a completely different meaning in Objective-C convention. This would mean that object is getting the name attribute by some form of indirect access to the value. Maybe through delegation or some other technique. In other words "object" would have no "name" instance variable, so getName is not really an accessor method.

On Jun 22, 2007, at 9:08 AM, David LeBer wrote:


On 22-Jun-07, at 8:56 AM, Ken Anderson wrote:

I always type 2 spaces after a period.  I thought everyone did!

The Mac is not a typewriter: <http://www.amazon.com/Mac-Not- Typewriter-Professional-Level-Macintosh/dp/0938151312>

;david

--
David LeBer
Codeferous Software
'co-def-er-ous' adj. Literally 'code-bearing'
site:   http://codeferous.com
blog: http://davidleber.net
profile: http://www.linkedin.com/in/davidleber
--
Toronto Area Cocoa / WebObjects developers group:
http://tacow.org


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/robertwalker1% 40mac.com

This email sent to [EMAIL PROTECTED]

--
Robert Walker
[EMAIL PROTECTED]



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to