Hi --

On Thu, 4 Aug 2005, Navindra Umanee wrote:

> Takaaki Tateishi <ttate / ttsky.net> 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 like it!  Looks much more uniform and consistent with function
> syntax than {|...| ...}

I assume you mean method syntax.  But why is that important?  Until
this new syntax was posted, I'd never heard anyone complain that they
found it hard to recognize {|...| } as a code block.  Now there seems
to be a retroactive sentiment in the air that the block syntax is, and
always has been, obscure or garbled.

If uniformity is important maybe def should be redesigned:

   def x |a,b,c=1|
   end

Then you'd have parallels between blocks and methods:

   def == {
   end == }
   || == ||

without the -> thing.


David

-- 
David A. Black
dblack / wobblini.net