in reply to Re: Re: What should be returned in scalar context?
in thread What should be returned in scalar context?
As of last week, Larry's plan is to make Perl 6 much more consistent in that respect. My speculation (not his official pronouncement) is that there'll be two versions of each operator, one that works in-place and one that returns the modified value, leaving the original untouched.
It'll probably go further than Ruby's convention of postfixing ! to methods that operate in-place, perhaps having language support for adding this behavior to your own operators.
It's only in the idea stages, though.
|
|---|