in reply to a-symetric operators

Actualy, I think most of them would be unavaliable.

Going highest to lowest precidence, and counting only binary ops:

  1. **: available.
  2. *: conflicts with globs.
  3. /: conflicts with regex matches.
  4. %: conflicts with hashes.
  5. x: available, but probably not very useful in reverse.
  6. +: conflicts with unary +.
  7. -: conflicts with unary negation.
  8. .: conflicts with numbers 0<x<1, probably OK to DWIM with.
  9. <<, >>: available.

I'm out of paticence, but the rest are all mostly symetric.


Warning: Unless otherwise stated, code is untested. Do not use without understanding. Code is posted in the hopes it is useful, but without warranty. All copyrights are relinquished into the public domain unless otherwise stated. I am not an angel. I am capable of error, and err on a fairly regular basis. If I made a mistake, please let me know (such as by replying to this node).

Replies are listed 'Best First'.
Re: Re: a-symetric operators
by Pardus (Pilgrim) on Jan 23, 2003 at 03:19 UTC
    Ok -- I was forgetting for a moment the fact that whitespaces are just for the coder's eye, and not for the parser's.
    But still ...
    --
    Jaap Karssenberg || Pardus (Larus)? <pardus@cpan.org>
    >>>> Zoidberg: So many memories, so many strange fluids gushing out of patients' bodies.... <<<<
Re: a-symetric operators
by Abigail-II (Bishop) on Jan 23, 2003 at 23:46 UTC
    Well, ** isn't available.
    $x =** 4;
    is a syntax error, as that parses as:
    $x = ** 4;
    . ** is the glob *.

    Also,

    $str =<<'--'; Foo --

    already has a meaning, so << is out as well.

    x is also not available.

    $x =x 4; # Parses as $x = x(4), if there's a sub 'x'.

    Abigail

      << I considered shortly after I wrote this -- but I was already in bed. ** could probably DWIM. x may or may not be able to DWIM... I'd have to think about it more. In any case, enough of them simply won't work for it to kill the idea, methinks, so it's rather moot.


      Warning: Unless otherwise stated, code is untested. Do not use without understanding. Code is posted in the hopes it is useful, but without warranty. All copyrights are relinquished into the public domain unless otherwise stated. I am not an angel. I am capable of error, and err on a fairly regular basis. If I made a mistake, please let me know (such as by replying to this node).