I think it is very hard to read and for something that nobody does very often. (It'd make Perl like PHP, but with non-alphanumeric operators...) Introducing at least 8 new operators just to save a few characters is not worth it for such a rare occasion.
||= and //= are not comparing operators like > and <. They aren't comparison operators. They're normal binary operators that happen to short circuit. Syntactically they work like +, so they deserve a mutating variant, just like the other binary operators:
I wouldn't be surprised to see . get a .=.|| ||= && &&= ^^ ^^= // //= + += ~ ~= - -= * *= / /= % %= +& +&= ~& ~&= +| +|= ~| ~|= +^ +^= ~^ ~^= +< +<= ~< ~<= +> +>= ~> ~>= x x=
Juerd # { site => 'juerd.nl', plp_site => 'plp.juerd.nl', do_not_use => 'spamtrap' }
In reply to Re: Thoughts on some new operators for perl (6 or 7)
by Juerd
in thread Thoughts on some new operators for perl (6 or 7)
by BigLug
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |