From: "Brian Schröder" Date: 2005-08-18T18:50:38+09:00 Subject: Re: Newbie question On 17/08/05, David Douthitt wrote: > > James Edward Gray II wrote: > > The difference is in binding. {...} binds tighter than do...end > > I ALWAYS use {} for block delimiters. > > Serious question (which demands a serious answer): why would anyone > want to use do ... end for blocks, anyway? > > I'm sure there is a good reason to use them, I just don't know what it > is. > 1) Binding when it is neccessary. (Though I prefer brackets except for special cases as rake). 2) To differntiate between blocks where the return value is used vs. blocks where the sideeffekt is used. That makes for faster code-reading. regards, Brian -- http://ruby.brian-schroeder.de/ Stringed instrument chords: http://chordlist.brian-schroeder.de/