It would be nice if we could do:
sub foo ([$x, $y]) {
say "$x, $y";
}
...instead of:
sub foo ($pair) {
my ($x, $y) = @$pair;
say "$x, $y";
}
...but also (if the previous has been done):
my { $x, $y } = { x => 5, y => 6 };
...or:
my { x => $value_x, y => $value_y } = { x => 5, y => 6 };
Would certainly help with users of RxPerl, who often write code like:
$observable->pipe(
op_pairwise,
op_map(sub ($pair) {
my ($old, $new) = @$pair;
...
}),
);