------ art_15779_13592843.1137803529796 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline I tend to prefer to adopt the stylistic conventions of the language I am working in. Rather than try to hold on to some cross-language personal preference, I find having my code match the style of the libraries that I am using to be the most aesthetically pleasing. Gabe On 1/20/06, Zach <zacharooni / comcast.net> wrote: > > I know the current naming standards of the language. My curiosity is > how many programmers prefer it. > > Prime example given by a few: snake_case is preferable to Japanese > Readers. > > -Zach > > Eero Saynatkari wrote: > > >Zach wrote: > > > > > >>Alrighty, > >> > >> I've another question I'd like to pose the Ruby community. Coming > >>from a Java background, so I'm rather used to "camelCase" as opposed to > >>what looks to be the standard "ruby_case". (For those who don't know, If > >>a method is java was named "DoSomething" it would be called > >>"doSomething" in Java, and likewise "do_something" in Ruby.) > >> > >>Arguments I've personally witnessed against Camel Case is Acronyms. If I > >>have an "ABC" in Camel Case it I'd have to would be to break up the > >>acronym like "aBC" if it appears at the beginning of the word. A lot of > >>people try to push the word to the end, others say to have the whole > >>acronym as lowercase "abc", but I think that is just a workaround for > >>the problem not a solution. > >> > >>Once I started programming in ruby, I was a little surprised at the use > >>of the underscore, but I'm wondering the sentiments of the programmers > >>out there. Do you prefer word breaks by underscore or case? Does is look > >>more readable? Does anything else irk you with Camel Case and/or Ruby's > >>preference? > >> > >>Not trying to incite flame_wars or the like, looking for honest > >>opinions. > >> > >> > > > >The big thing is that Ruby attaches semantic meaning to the naming > >scheme: all constants must start with an uppercase letter, so your > >classes and modules have CamelCaseNames. Because of this, seeing > >something like obj.MethodName or even obj.methodName causes a ruby > >programmer an involuntary double-take to ensure it indeed refers to > >a method, not a constant. For this reason (and others that have been > >battled over pretty much since the keyboard was invented), it is > >preferred that the following is used: > > > > * Classes and modules use CamelCase > > * Constants use ALL_CAPS > > * Methods and variables use underscored_names > > > > > > > >>-Zach > >> > >> > > > > > >E > > > > > > > > ------ art_15779_13592843.1137803529796--