From: Robert Klemme Date: 2003-07-31T19:58:48+09:00 Subject: Re: Ruby could be wildly more popular if it had ... "Arthur" schrieb im Newsbeitrag news:16e0bc53.0307310222.11587422@posting.google.com... > "Gavin Sinclair" wrote in message news:<60107.203.185.214.34.1059543084.squirrel@webmail.imagineis.com>... > > > On Tue, 2003-07-29 at 22:30, Robert Klemme wrote: > > > > > >> My solution is to use {} for one line blocks and do..end for more > > >> complicated things. > > > > > > I tried this style for a while. But then every time I added lines to a > > > one-line block, I had to change {} to do/end. > > > > > > Today I normally used {} on all blocks, except in Rake files. > > > > > > My take is: {} are for functional blocks; do..end for procedural blocks. > > That shows me which expressions are important for their results, and which > > are not. > > > > Gavin > > > This sounds very interesting. Can you expand upon this a little? > What do you take as the difference between procedural blocks and > funcitonal blocks? Can you provide an example? I guess he means (0..10).each do |i|; puts i; end (0..10).map {|i| i+i} robert