From: Christian Neukirchen Date: 2005-08-05T01:14:46+09:00 Subject: Re: ruby-dev summary 26468-26661 Jamis Buck 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 http://chneukirchen.org