From: ptkwt@...1.aracnet.com (Phil Tomson) Date: 2002-03-16T04:16:33+09:00 Subject: Re: camelCase and underscore_style In article <99DD35F8BFC4D511A3C500508BEE03A23246DC@mail01>, Morris, Chris wrote: >First, a question. If underscore_style is the Ruby norm for methods and the >like, what's the Ruby norm for class names? The few I perused were single >word classes (like String, Array), but all my classes seem to be two or >three words, so I CamelCaseThem. Is that Ruby typical? > >Ron: >> And why can't Ruby people use camel case? it is ten times >> easier to type >> x-shift-P than to type x_p. Or at least 50% easier :) But I digress... > >Pete: >> (umm ... lost the msg, but he said, to him, >underscore_style_was_easier_to_read) > >I agree with Ron on the typing point, and after giving the underscore style >a try, I think it is easier to read one thing with the underscore style, but >I find a whole block of code with lots of underscored names in it >distracting, because my eye is drawn to the underscores. Or is a code block >with lots of underscored names a code smell? :) > >I noticed code samples in the pickaxe book used camelCase. Dave/Andy, was >this an issue at all in writing the book? > >Chris > Personally, I tend to use camelCase for variable and class names and underscore_style for method names but I don't think there is any consensus on this and it probably just indicates that I'm very confused ;-) Phil