To try and make it easier to pick (ASCII) operators, a simple table of
what's given away and what's available. Please let me know if there are
any mistakes.

If anyone knows how to fill in the "???" parts, be my guest!

    \W+      Term (pre|circ)   Operator (post|in)
    `        AVAILABLE         AVAILABLE
    ``       AVAILABLE         AVAILABLE
    ~        stringy           concat
    ~...                       string bitops
    ~~       AVAILABLE?        smart match
    !        not               none() ???
    !=                         ! == 
    !~                         ! ~~
    !!       AVAILABLE?        AVAILABLE?
    @        array             AVAILABLE
    @@       AVAILABLE?        AVAILABLE
    #        comment           comment
    $        scalar            AVAILABLE
    $$       AVAILABLE?        AVAILABLE
    %        hash              mod 
    %%       AVAILABLE?        AVAILABLE?
    ^        AVAILABLE         one()
    ^^       AVAILABLE         xor
    &        sub               all()
    &&       (clash)           and
    *        splat             multiply
    **       steam roller      power
    ()       group             sub (deref+)call (no ws)
    ()?      (clash)           AVAILABLE (ws)
    \        ref               AVAILABLE
    \\       AVAILABLE?        AVAILABLE
    |        AVAILABLE         any()
    ||       AVAILABLE         or
    []       aref|reduce       array (deref+)subscript (no ws)
    []?      (clash)           AVAILABLE (ws)
    {}       href|closure      hash (deref+)subscript (no ws)
    {}?      (clash)           AVAILABLE (ws)     
    +        numeric           add
    +...                       numeric bitops
    ++       preinc            postinc
    =        iterate           assign
    =>       AVAILABLE         pair
    ==       AVAILABLE?        num eq
    ==>      pipe              pipe
    -        0-                substract
    ->       sub               sub
    --       predec            postdec
    -->      AVAILABLE         AVAILABLE?
    ''       q                 AVAILABLE ('|'')
    ""       qq                AVAILABLE ("|"")
    ,        ???               list sep
    ,,       ???               ???
    <>       qw                hash (deref+)subscript (no ws)
    <>?      (clash)           AVAILABLE (ws)
    <        (clash)           less-than (ws)
    <=       (clash)           le (ws)
    <==      pipe              pipe
    <->      don't touch it, I'm going to use this for -> is rw :)
    >        AVAILABLE (ws)    greater-than
    >=       AVAILABLE (ws)    ge (ws?)
    <<>>     qw                hash (deref+)subscript (no ws)
    <<[>>]?  (clash)           AVAILABLE (ws)
    <<       hyper             hyper
    >>       hyper             hyper
    .        $_.               (deref+)subscript|method call
    /        (clash)           divide
    //       m//               defined-or
    ?        true              AVAILABLE
    ?...                       boolean bitops
    ??       AVAILABLE?        ternary
    ::       namespace         ternary

    \w+      infix only
    x        passive repeat
    xx       passive repeat
    X        active repeat ???
    XX       active repeat ???
    Y        zip()
    many still available!
    
With double characters (like ~~), "AVAILABLE?" means that if we start
using that, stacking of the single thing will start requiring
whitespace, as with = and == in $foo = =$fh)

"ws?" means that whitespace may be needed for disambiguation.

I left out colon and semicolon because they're too special to fit in a
term|op table. I think it's more than safe to assume they're taken :)

<> is more flexible than {}, [] and () because it's a quoting operator
(the inside is not an expression).

I think it's best to ignore entirely the fact that we can use more
triple character proper operators :)


Juerd
-- 
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html 
http://convolution.nl/gajigu_juerd_n.html

Reply via email to