in reply to Re: Re: Re: Re: Thoughts on some new operators for perl (6 or 7)
in thread Thoughts on some new operators for perl (6 or 7)
If you want mutating on an object, than you should define method to work that way already.
No, that is exactly the opposite of what I want. That way you get again the mess that Perl 5 also has: some are mutating, some are not. I want everything to be non-mutating by default with some kind of modifier to make it mutating. This thread made me think of .= and I think it is a very good candidate, because it works much like the other op= operators: foo op= bar does the same as foo = foo op bar, but with possible optimizations.
Juerd # { site => 'juerd.nl', plp_site => 'plp.juerd.nl', do_not_use => 'spamtrap' }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Thoughts on some new operators for perl (6 or 7)
by hardburn (Abbot) on Mar 10, 2004 at 17:15 UTC | |
by Juerd (Abbot) on Mar 10, 2004 at 17:31 UTC | |
by hardburn (Abbot) on Mar 10, 2004 at 17:34 UTC | |
by Juerd (Abbot) on Mar 10, 2004 at 17:38 UTC |