Suggestion: prepend a ~ or , to numeric comparison operators
Addresses the key concerns:
o frees up .
o spaces insensitive (though cmp, eq, ...do care about spaces)
o using the , instead of ~ would be 1 keystroke on most keyboards
o ~ and , visually intuit a string (~ more than ,)
o avoids: $foo = "foo" + "$foo" + foo + foo()
o easy to differentiate string and numeric ops
o doesn't spill over into other syntax changes... (i think)
From: Stephen P. Potter [mailto:[EMAIL PROTECTED]]
>
> Garrett Goebel <[EMAIL PROTECTED]> whispered:
> | Perl 5 Perl 6
> | --------------- ---------------
> | -> .
> | + +
> | . ~+
> | .= ~+=
> | ~=+
[and possibly consider]
> | eq ~== or eq
> | ne ~!= or ne
> | gt ~> or gt
> | ge ~>= or ge
> | lt ~< or lt
> | le ~<= or le
> | cmp ~<=> or cmp
> |
> | You can leave aliases for eq, ne, gt... or depreciate them.
> | -But leave precedence as is...
> It's not bad enough that we're getting a proliferation of trigraph
> operators, now you want to add a quadgraph? No thank you.
cmp requires typing at least 4 characters too:
sort {$a cmp$b} qw(z y x);
sort {${a}cmp$b} qw(z y x);
It has been suggested to me privately to leave the lettered ops eq, ne, cmp,
etc. alone since there is a history behind using lettered ops on strings and
symbol ops on numbers. That's fine. You might consider allowing either, or
possibly just dropping the trigraphs and/or quadgraphs.