From: "David A. Black" Date: 2005-10-14T06:51:04+09:00 Subject: Re: Default argument values for blocks Hi -- On Fri, 14 Oct 2005, Gyoung-Yoon Noh wrote: > On 10/12/05, Yukihiro Matsumoto wrote: >> Hi, >> >> In message "Re: Default argument values for blocks" >> on Wed, 12 Oct 2005 20:42:06 +0900, Christophe Grandsire writes: >> >> |Hey, what about ":(foo="bar"){puts foo}"? It's still not beautiful but it's >> |still less annoying, and in Ruby we are already used to see colons at the >> |beginning of a word. Of course, overloading ":" may not be considered a good >> |idea, but it shouldn't be a parsing problem as this one would always be >> |followed by a "(" (and that doesn't happen with symbols). And: >> | >> |collection.each:(foo="bar"){puts foo} >> | >> |isn't that bad :) . >> >> I have never thought of that. Hmm, let me think about it during the >> conference trip. I'm leaving tomorrow morning. >> >> matz. >> >> > > +1 > > collection.each : (foo="bar") { puts foo } > > It looks like 'when condition : expression' branch in > 'case' statement. But why would you want a method call and argument list and block to look like when condition : expression ? There's no "then" meaning to it. David -- David A. Black dblack@wobblini.net