in reply to Re: Re: Thoughts on some new operators for perl (6 or 7)
in thread Thoughts on some new operators for perl (6 or 7)
.= doesn't make sense for its new purpose
If you can't imagine a function for it, it automatically does not make sense?
It could very well become a mutator for objects.
As $foo += 5 equals $foo = $foo + 5, $foo .= lc could equal $foo = $foo.lc. Especially for @foo.sort and @foo.=sort, this would be great to have.
I've been wanting mutating and non-mutating versions of builtins for a while now, and this seems to me a good way to do it.
See also Re: Re: What should be returned in scalar context?.
Does it make sense now?