On 04/08/05, Jamis Buck <jamis / 37signals.com> wrote: > On Aug 4, 2005, at 7:31 AM, David A. Black wrote: > > > Hi -- > > > > On Thu, 4 Aug 2005, Takaaki Tateishi wrote: > > > > > >> [ruby-dev:26623] Ruby2.0BlockParameterNotation > >> Sasada asked about new notation of block parameter. This issue is > >> summarized > >> at the following sites. Now ruby(HEAD) accepts the notation '-> > >> (...){...}'. > >> > > > > I'm not clear on what problem or shortcoming this addresses. Also, > > I'm concerned that this amount of multiplied punctuation is going to > > detract seriously from "clean" look of Ruby. I know it's not just a > > matter of counting punctuation characters. But going from {|x|} to > > ->(x){} seems like a major move in the "line noise" direction. > > > > > > IIRC, part of the problem with the || syntax is that it makes it very > difficult to support default parameter values, because the | becomes > ambiguous: > > { |x=5| x+7 } > > It's no longer possible to tell if the | marks the end of the > parameter block or a bit-wise OR without reading ahead, possibly to > the end of the block. > > - Jamis > > > Then why don't we use two different delimiters, e.g. (,) which would even unify with method declaration. { (a, b=12) a+b } is quite clear, and counting nesting parenthesis has to be done in any parser so this { (a=12, (b,c) = [1,2]) a+b**c } is also possible regards, Brian -- http://ruby.brian-schroeder.de/ Stringed instrument chords: http://chordlist.brian-schroeder.de/