Jamis Buck <jamis / 37signals.com> writes:

> 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.

I have no clue about the Bison grammar underlying Ruby, but can't you
"simply" say that if the first token after { is a |, you need to parse
until the next | to get the block parameters?

Of course, you couldn't write { |x = 5|7 | true } then... *I* can live
with that.

> - Jamis
-- 
Christian Neukirchen  <chneukirchen / gmail.com>  http://chneukirchen.org