From: Robert Klemme Date: 2009-04-28T16:13:55+09:00 Subject: Re: Block Style 2009/4/28 James Gray : > On Apr 27, 2009, at 3:25 PM, Robert Klemme wrote: > >> On 27.04.2009 19:11, Robert Dober wrote: >>> >>> (I guess that it is {} for one liners and do end otherwise than) >> >> One liner and multi liner is actually exclusive, which cannot be said of >> return value and side effects.  Maybe my sticking to the syntactical >> convention is the reason why I never bother to think about which rules to >> use.  James, maybe that can ease your "pain" as well?  :-) > > It's definitely easier, but it can lead to less pretty code too, like: > >  whatevery.map do |e| >    # multiple lines of calculation here... >  end.find { ... } > > That's one reason why I was looking into the other option. Well, I personally do not find that "less pretty" - but this lies in the eye of the beholder. :-) If it comes to prettiness of code, for me these items are more important: * proper indentation, * avoidance of deep nesting of control structures, * wise use of empty lines to visually separate logical bits of code. But I'm digressing... Kind regards robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/