[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: camelCase vs ruby_case

Gennady Bystritsky

1/20/2006 7:44:00 PM

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/i... 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



6 Answers

Zach

1/20/2006 7:50:00 PM

0

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/i... 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

1/20/2006 9:28:00 PM

0

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/i... 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://yakima...
ezra@yakima-herald.com
blog: http://b...




kim kubik

1/21/2006 9:09:00 PM

0


"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/pike...


Tracey12

1/17/2010 10:06:00 PM

0

On Jan 17, 3:56 pm, Ron <roneal1...@att.net> wrote:
> On Jan 17, 11:11 am, John Q Public <my2ce...@me.com> wrote:
>
> > On 2010-01-17 10:45:24 -0500, Ron <roneal1...@att.net> said:
>
> > > On Jan 17, 8:22 am, Tracey12 <tracey12em...@gmail.com> wrote:
> > >> President Obama saves Haiti.  He's going to rebuild the quake damaged
> > >> country from the ground up.  He will rebuild millions of homes.
>
> > >> In America, millions of homes are being lost to greedy banks who can't
> > >> wait to foreclose and reap the reward of lost equity.
>
> > >> Obama could ask his banker friends to back down and not take homes
> > >> from Americans for a period of time allowing the economy to grow and
> > >> with new job opportunities, making it possible for families to begin
> > >> to make their normal mortgage payments, but he's not saying a word
> > >> except that he's going to save Haiti.
> > > .
> > > .
> > > We could post pages of arguments on the issue of foreclosed mortgages
> > > and who is motivated by what, etc.  And besides that, aid to Haiti is
> > > not coming just from the US.  It is pouring in from all over the
> > > world.
>
> > > Stand up and look around.  Where is the greatest need?  Who is
> > > suffering the most?  Who has the means to ease and alleviate that
> > > need?
>
> > > Why do you (like Limbaugh) color a humanitarian need with political
> > > snipes?
>
> > > Grow up.
>
> > > RO
>
> > Gee, guess those loving grateful democrats didn't politicize Katrina!
> > Fuckwit!- Hide quoted text -
>
> > - Show quoted text -
>
> .
> .
> There was no need for Democrats to make any effort to politicize
> Katrina.  Bush did it by shooting himself in the foot when he attended
> McCain's birthday party as New Orleans submerged:
>
> http://thinkprogress.org/2008/04/24/flashback-as-katrina-ra......
>
> RO

Im amazed! Dems openly place the needs of another country over the
needs of children here in America who are being booted out in the cold
by ineffective policies that have helped only 31,000 homeowners when
millions are losing their homes! Dems favor Haitians over Americans!
They said it right here!

let those American kids freeze in the winter cold. Obama needs to
rescue Haiti.

Ron

1/18/2010 12:23:00 AM

0

On Jan 17, 4:05 pm, Tracey12 <tracey12em...@gmail.com> wrote:
> On Jan 17, 3:56 pm, Ron <roneal1...@att.net> wrote:
>
>
>
>
>
> > On Jan 17, 11:11 am, John Q Public <my2ce...@me.com> wrote:
>
> > > On 2010-01-17 10:45:24 -0500, Ron <roneal1...@att.net> said:
>
> > > > On Jan 17, 8:22 am, Tracey12 <tracey12em...@gmail.com> wrote:
> > > >> President Obama saves Haiti.  He's going to rebuild the quake damaged
> > > >> country from the ground up.  He will rebuild millions of homes.
>
> > > >> In America, millions of homes are being lost to greedy banks who can't
> > > >> wait to foreclose and reap the reward of lost equity.
>
> > > >> Obama could ask his banker friends to back down and not take homes
> > > >> from Americans for a period of time allowing the economy to grow and
> > > >> with new job opportunities, making it possible for families to begin
> > > >> to make their normal mortgage payments, but he's not saying a word
> > > >> except that he's going to save Haiti.
> > > > .
> > > > .
> > > > We could post pages of arguments on the issue of foreclosed mortgages
> > > > and who is motivated by what, etc.  And besides that, aid to Haiti is
> > > > not coming just from the US.  It is pouring in from all over the
> > > > world.
>
> > > > Stand up and look around.  Where is the greatest need?  Who is
> > > > suffering the most?  Who has the means to ease and alleviate that
> > > > need?
>
> > > > Why do you (like Limbaugh) color a humanitarian need with political
> > > > snipes?
>
> > > > Grow up.
>
> > > > RO
>
> > > Gee, guess those loving grateful democrats didn't politicize Katrina!
> > > Fuckwit!- Hide quoted text -
>
> > > - Show quoted text -
>
> > .
> > .
> > There was no need for Democrats to make any effort to politicize
> > Katrina.  Bush did it by shooting himself in the foot when he attended
> > McCain's birthday party as New Orleans submerged:
>
> >http://thinkprogress.org/2008/04/24/flashback-as-katrina-ra......
>
> > RO
>
> Im amazed!  Dems openly place the needs of another country over the
> needs of children here in America who are being booted out in the cold
> by ineffective policies that have helped only 31,000 homeowners when
> millions are losing their homes!  Dems favor Haitians over Americans!
> They said it right here!
>
> let those American kids freeze in the winter cold.  Obama needs to
> rescue Haiti.- Hide quoted text -
>
> - Show quoted text -
.
.
This country has support systems of some sort or another to give SOME
measure of help to those who lose their income and homes.

Haiti ain't got shit.

You have a very indifferent attitude, Tracey. By your thinking,
nationality determines who should get relief. In my first post here,
I asked the question, "Who is in GREATEST need?"

Hint: Haiti.

RO

Tracey12

1/18/2010 7:02:00 PM

0

On Jan 17, 6:23 pm, Ron <roneal1...@att.net> wrote:
> On Jan 17, 4:05 pm, Tracey12 <tracey12em...@gmail.com> wrote:
>
> > On Jan 17, 3:56 pm, Ron <roneal1...@att.net> wrote:
>
> > > On Jan 17, 11:11 am, John Q Public <my2ce...@me.com> wrote:
>
> > > > On 2010-01-17 10:45:24 -0500, Ron <roneal1...@att.net> said:
>
> > > > > On Jan 17, 8:22 am, Tracey12 <tracey12em...@gmail.com> wrote:
> > > > >> President Obama saves Haiti.  He's going to rebuild the quake damaged
> > > > >> country from the ground up.  He will rebuild millions of homes.
>
> > > > >> In America, millions of homes are being lost to greedy banks who can't
> > > > >> wait to foreclose and reap the reward of lost equity.
>
> > > > >> Obama could ask his banker friends to back down and not take homes
> > > > >> from Americans for a period of time allowing the economy to grow and
> > > > >> with new job opportunities, making it possible for families to begin
> > > > >> to make their normal mortgage payments, but he's not saying a word
> > > > >> except that he's going to save Haiti.
> > > > > .
> > > > > .
> > > > > We could post pages of arguments on the issue of foreclosed mortgages
> > > > > and who is motivated by what, etc.  And besides that, aid to Haiti is
> > > > > not coming just from the US.  It is pouring in from all over the
> > > > > world.
>
> > > > > Stand up and look around.  Where is the greatest need?  Who is
> > > > > suffering the most?  Who has the means to ease and alleviate that
> > > > > need?
>
> > > > > Why do you (like Limbaugh) color a humanitarian need with political
> > > > > snipes?
>
> > > > > Grow up.
>
> > > > > RO
>
> > > > Gee, guess those loving grateful democrats didn't politicize Katrina!
> > > > Fuckwit!- Hide quoted text -
>
> > > > - Show quoted text -
>
> > > .
> > > .
> > > There was no need for Democrats to make any effort to politicize
> > > Katrina.  Bush did it by shooting himself in the foot when he attended
> > > McCain's birthday party as New Orleans submerged:
>
> > >http://thinkprogress.org/2008/04/24/flashback-as-katrina-ra.......
>
> > > RO
>
> > Im amazed!  Dems openly place the needs of another country over the
> > needs of children here in America who are being booted out in the cold
> > by ineffective policies that have helped only 31,000 homeowners when
> > millions are losing their homes!  Dems favor Haitians over Americans!
> > They said it right here!
>
> > let those American kids freeze in the winter cold.  Obama needs to
> > rescue Haiti.- Hide quoted text -
>
> > - Show quoted text -
>
> .
> .
> This country has support systems of some sort or another to give SOME
> measure of help to those who lose their income and homes.
>
> Haiti ain't got shit.
>
> You have a very indifferent attitude, Tracey.  By your thinking,
> nationality determines who should get relief.  In my first post here,
> I asked the question, "Who is in GREATEST need?"
>
> Hint: Haiti.
>
> RO

America is bankrupt. We are borrowing billions if not trillions to
operate our country. WE don't have enough handouts for our own
people. Americans are going hungry and losing their homes by the
millions. We have for decades been the world's savior post disaster.
Its time to put AMERICA FIRST by focusing on the needs of our people.
We have 30,000,000 million illegal aliens in the USA and the vast
majority are taking jobs we need, and are on welfare which we cannot
afford. We are doing our part to help the foreign poor. We have
30,000,000 foreigners here who can barely speak our language that we
are feeding.