On Tue, 29 Oct 2002, Michael Lazzaro wrote:
:    (is whitespace allowed inside the brackets, e.g. [ + ] vs. [+] ?)

I don't think so.

: unary (prefix) operators:
:    .     - method call on current topic

I think we have to have unary .= as well, if we're to do the

    .=replace

trick on $_.

: unary (postfix) operators:
:    ...   - [maybe] same as ..Inf     [Damian votes Yes]

I wonder if we can possibly get the Rubyesque leaving out of
endpoints by saying something like 1..!10.

: other postfix operators:
: 
:    ()    - (when operator is expected)
:    []    - array access
:    {}    - hash access

These now consistently require no space, and they're all
when an operator is expected, not just ().

: binary operators:
: 
:    (do more of these have possible +~? prefix modifiers,
:     or only the boolean &|^ ops?)

Well, things like < already imply numeric, and things like lt already
imply string.  The booleans are already officially polymorphic.

:     +     -     *     /     %     **     x     xx     ~      - arithmetic
:     +=    -=    *=    /=    %=    **=    x=    xx=    ~=

I don't think of x or ~ as arithmetic exactly...

:     .&      .|      .^      <<      >>      - bitwise (integer) 
: operations
:     .&=     .|=     .^=     <<=     >>=

These should be +& etc.

:     sum     prod    cat   reduce    - [maybe]

That's Apocalypse 29.  :-)

:     ~~      !~                      - smart match, smart non-match
:    like   unlike                    - [maybe]  [Damian votes No]

Undecided.

:    ..   - range
:    ...  - [maybe] range, exclusive of endpoint   [Damian votes No]

Still thinking about ..! or ..^ or some such.  Could have ^..^ and ^..
too, for all that.

:    ::=  - binding, but more so

Cute, but nonexplanatory.  Binding at compile time.

: trinary operator:
: 
:    ?? ::    - if/else
: 
: parens, misc, and quotelike operators
:    ()
:    []    - [when term is expected]
:    {}    - [when term is expected]

Again, all of these are when a term is expected, not just the latter two.

:    m//   - shorthand, "matches"
:    s///  - shorthand, "substitute"
:    tr/// - shorthand, "transliterate"
: 
:    '...'  "..."   `...`   /.../   << >>
:      q     qq      qx      rx      qw     [qm?]
:                         [+ qr ?]

No, the qr is dead.  Long live the rx.

:    <...>        - readline

Iterate interator.

:    (heredocs)   - [exact format unknown]

Probably still the same, at least until we start thinking about it...

: magical whitespace modifier
:    _     - [maybe] remove whitespace/newline
:    (briefly discussed, but not an operator?)

We need something here.  Underline is available.

: explicit radix specifications for integers:
:    (we'll just handle this issue separately, OK?)

Fine.  I'm not sure we actually have to change anything here from Perl 5.
Syntactic mangling could easily work for anyone who wants base 42.

: other uncategorized:
:    (no decisions are implied about these, e.g. are they
:     ops, listops, methods, whatever... decide later)
: 
:    my     our     - [declar]
:    map    grep
:    sqrt   log       sin     cos      tan  (etc...)   - math
:    lc     lcfirst   uc      ucfirst
:    int    ord       oct     hex       bin

oct and hex are arguably backwards, typewise.  They don't produce
octal or hex types, but rather consume them.

Larry

Reply via email to