in reply to Re^5: Thoughts on some new operators for perl (6 or 7)
in thread Thoughts on some new operators for perl (6 or 7)
In practice, you're not going to get that, unless you convince every Perl programmer to lay out their class design so they respect the mutating/non-mutating idiom.
Not really. It'd be relatively simple to build in fallback support. That is: if there is no mutating variant, the non-mutating variant can be used with normal assignment and if there is no non-mutating variant, the mutating variant can be used with a temporary copy. The first thing happens in Perl 5 already with tied values: += is optimized for normal scalars, but for tied scalars separate FETCH and STORE calls take place.
Also, is it your habit to downvote every node you happen to disagree with?
No, only if the node is a proposal. Is it yours?
Juerd # { site => 'juerd.nl', plp_site => 'plp.juerd.nl', do_not_use => 'spamtrap' }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re^5: Thoughts on some new operators for perl (6 or 7)
by hardburn (Abbot) on Mar 10, 2004 at 17:34 UTC | |
by Juerd (Abbot) on Mar 10, 2004 at 17:38 UTC |