camelCase vs ruby_case

There were a LOT of discussions on the subject over time on this list.
Please search ruby-talk archive at
http://www.ruby-talk.org/ruby/ruby-talk/index.shtml to get an idea.

Gennady.

···

-----Original Message-----
From: Zach [mailto:zacharooni@comcast.net]
Sent: Friday, January 20, 2006 11:32
To: ruby-talk ML
Subject: camelCase vs ruby_case

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.

-Zach

Great!
     Thanks Grennady.

-Zach

Gennady Bystritsky wrote:

···

There were a LOT of discussions on the subject over time on this list.
Please search ruby-talk archive at
http://www.ruby-talk.org/ruby/ruby-talk/index.shtml to get an idea.

Gennady.

-----Original Message-----
From: Zach [mailto:zacharooni@comcast.net] Sent: Friday, January 20, 2006 11:32
To: ruby-talk ML
Subject: camelCase vs ruby_case

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.

-Zach

Zach-

  I prefer the snake_case myself as it5 is more readable. But one of the best reasons I have come across for always using underscores in ruby is the ruby is from Japan and Matz has said that snake_case is much more readable for japanese people to read. That and the fact that the whole standard library and most ruby code you will come across uses snake_case so camelCase looks out of place in ruby code.

Cheers-
-Ezra

···

On Jan 20, 2006, at 11:49 AM, Zach wrote:

Great!
    Thanks Grennady.

-Zach

Gennady Bystritsky wrote:

There were a LOT of discussions on the subject over time on this list.
Please search ruby-talk archive at
http://www.ruby-talk.org/ruby/ruby-talk/index.shtml to get an idea.

Gennady.

-----Original Message-----
From: Zach [mailto:zacharooni@comcast.net] Sent: Friday, January 20, 2006 11:32
To: ruby-talk ML
Subject: camelCase vs ruby_case

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.

-Zach

-Ezra Zygmuntowicz
WebMaster
Yakima Herald-Republic Newspaper
http://yakimaherald.com
ezra@yakima-herald.com
blog: http://brainspl.at

"Zach" wrote

> 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".
>
> Not trying to incite flame_wars or the like, looking for honest
> opinions.

The quote below is just one other person's opinion, but if you know
what that person has accomplished then perhaps you understand why
that opinion has value:

   "I eschew embedded capital letters in names; to my prose_­oriented
eyes,
    they are too awkward to read comfortably. They jangle like bad
typography."

Quote is from:

http://www.lysator.liu.se/c/pikestyle.html