On Wed, 2 Nov 2005, John Williams wrote:
surprises including operandless operators. Including mutating operandless
operators. What is s/// after all? Or is there a good reason for an
asymmetry between different classes of operators?
Well, s/// is a term, for one thing.
It is not so much an operator, as it is a subroutine with really strange
syntax, and the side-effect of changing the $_ variable. You need to use
an operator to get it to affect a different variable.
While others have pointed out that this is not that much of a difference
from a strictly technical pov, I'll say that this is a good point! But
since I _still_ like the proposal, differently from the person who made it
in the first place, maybe consistency could be re-gained allowing the
smart match operator to perform esoteric forms of mutation, e.g.
$var ~~ ++; # Ouch, and how 'bout $var++ instead? ;-)
At least this would help in the direction of curing the fear that P6 won't
be just as suited for obfuscation as P5 is...
Michele
--
I agree with Tore; it's sort of a Zen question.
If you have to ask, it means you won't understand the answer.
If you know enough to understand the answer, you won't need the question.
- Joe Smith in clpmisc, "Re: Perl neq Python"