in reply to Re^3: "when" and replacements
in thread "when" and replacements
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: "when" and replacements
by JavaFan (Canon) on May 08, 2011 at 11:09 UTC | |
|
Re^5: "when" and replacements
by LanX (Saint) on May 08, 2011 at 12:58 UTC |