Good day, monks.
I've seen that Perl likes operators and have plenty. I was amazed after I saw new in 5.22 (
Bitwise String Operators).
And I remember that usually I use to write
'$max < $c and $max = $c;' (if not using List::Util qw( max )), which is self repeating. And my idea was to somehow shorten such statements. Here I suggest an operator which shortens previous statement, e.g. these two code would be equivalent:
'$max < $c && ( $max = $c );' ===
'$max <&&= $c;'. New operator '<&&=', with other similar variants: '>&&=', '<=&&=', '>=&&=', and 4 more with '||' in the middle, although they are redundant. Associativity could be the same as of other assignment operators. Another construct suggestion for same operations, would be this: '(comparison_op.)=', which means, that any comparison op can be written inside parentheses, and it corresponds to:
'$max comparison_op. $c and $max = $c;'. Isn't this bad idea?