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

    No, only if the node is a proposal. Is it yours?

    It's just that every response of mine to you in this thread has been downvoted, which I find rather suspicious.

    ----
    : () { :|:& };:

    Note: All code is untested, unless otherwise stated

      It's just that every response of mine to you in this thread has been downvoted, which I find rather suspicious.

      Even if I wanted to, I'd have no way of downvoting something all the way down to -4. Do you think I have some kind of super powers on this site? :)

      Juerd # { site => 'juerd.nl', plp_site => 'plp.juerd.nl', do_not_use => 'spamtrap' }