From: Rick DeNatale Date: 2010-01-10T06:35:03+09:00 Subject: Re: Ruby editing style rules and recommendation? On Sat, Jan 9, 2010 at 3:01 PM, Nathan Oyama wrote: > I asked a question 'Decimal in for loop?' and two members were kind > enough to solve this problem. Thanks, Fleck and Aaron. > > Now I have another question: Are there any editing style rules and > recommendations in Ruby? > > In the previous thread, Fleck wrote: > > 0.step(0.5,0.1) { |i| p i } > > while Aaron wrote: > > (0..0.5).step(0.1) do |f| >  p f > end > > and both work identically. > > Which one is recommended in terms of the editing style? > > In C++, for example, I use Ellemtel rules > (www.doc.ic.ac.uk/lab/cplus/c++.rules) > . Emacs supports editing assistance in this style particularly > auto-indent. . . I'm sure that Emacs supports the similar feature in > Ruby too because Matz loves Emacs! Please advise. > Here's my two cents http://talklikeaduck.denhaven2.com/2007/10/02/ruby-blocks-do-or-brace -- Rick DeNatale Blog: http://talklikeaduck.denhaven2.com/ Twitter: http://twitter.com/RickDeNatale WWR: http://www.workingwithrails.com/person/9021-rick-denatale LinkedIn: http://www.linkedin.com/in/rickdenatale