You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The fact that the argument in the Capture is mutable is a rather
important aspect of the Capture, and the .perl isn't representing it.
It's showing code for a quite different Capture of an immutable argument.
This is less than awesome. Obviously .perl can't be expected to preserve
the specific identity of the mutable argument, but it could at least
preserve the fact that it's mutable, by emitting something like `\(my $
= 3)` in place of `\(3)`.
Same can also be said of other containers, including lists and pairs:
my $l = (10, my $ = 20); $l[1]++; say $l.perl;
$(10, 21)
my $p = (10 => my $ = 20); $p.value++; say $p.perl;
10 => 21
These also don't attempt to show mutability.
On Wed Aug 17 15:54:05 2016, zefram@fysh.org wrote:
my $a = 3; my $c = \($a); $c.perl
\(3)
The fact that the argument in the Capture is mutable is a rather
important aspect of the Capture, and the .perl isn't representing it.
It's showing code for a quite different Capture of an immutable argument.
This is less than awesome. Obviously .perl can't be expected to preserve
the specific identity of the mutable argument, but it could at least
preserve the fact that it's mutable, by emitting something like `\(my $
= 3)` in place of `\(3)`.
Migrated from rt.perl.org#128978 (status was 'open')
Searchable as RT128978$
The text was updated successfully, but these errors were encountered: