In Perl 6, you can declare the iteration variable of the for to have the desired attributes. For a given you could use an expression to cause a copy to be made: given (0+$x) {... and if you write a function that just returns its argument, and you call that function copy, then you could write given (copy $x) ... nice and sugary. It would be harder to impose aliasing if the normal case didn't.
But since it's been this way for a while now, I think any "fix" will be to use a pragma to choose the behavior.
In reply to Re^4: "when" and replacements
by John M. Dlugosz
in thread "when" and replacements
by John M. Dlugosz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |