in reply to Re: Perl::Improved Volume 0, Number 1
in thread Perl::Improved Volume 0, Number 1

I'm not convinced that the use of |...| to mean abs(...) doesn't break the existing grammar or introduces ugly whitespace dependency:

1+|a+b|+c+d|+1
can be naively parsed as
1+abs(a+(b|+c)+d)+1
or as
1+abs(a+b)+c+(d|+1)

because the ugly unary + is allowed, which breaks lots of things. Of course, introducing another slew of operator precedence could fix this, but I imagine it creates more confusion than the "clearer" syntax removes.

Replies are listed 'Best First'.
Re^3: Perl::Improved Volume 0, Number 1
by theorbtwo (Prior) on Sep 06, 2004 at 01:56 UTC

    Ah, thank you! My intuition told me that they conflicted, but I couldn't come up with a case -- largely because I forgot about unary +.

A reply falls below the community's threshold of quality. You may see it by logging in.