in reply to Thoughts on some new operators for perl (6 or 7)
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' }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Thoughts on some new operators for perl (6 or 7)
by hardburn (Abbot) on Mar 10, 2004 at 14:17 UTC | |
by Juerd (Abbot) on Mar 10, 2004 at 14:26 UTC | |
by hardburn (Abbot) on Mar 10, 2004 at 14:58 UTC | |
by Juerd (Abbot) on Mar 10, 2004 at 15:03 UTC | |
by hardburn (Abbot) on Mar 10, 2004 at 17:15 UTC | |
|
In Section
Meditations