Patrick R. Michaud wrote:
An even cleaner shortcut might be to use ^...@foo instead of ^[email protected]:for ^...@foo -> $k { do_something($k, @foo[$k]) } Somewhat clearer could be: for @foo.keys -> $k { do_something($k, @foo[$k]) } And some may prefer: for @foo.kv -> $k, $v { do_something($k, $v) } I think the anti-pattern of "[email protected]" (or its incorrect form "[email protected]") should probably disappear in favor of the above forms instead.
Even if there is no language change, at least it'd be good to ensure that "[email protected]" doesn't appear in the documentation. Instead, whoever writes the docs should use @foo.keys and @foo.kv. Those are *very* clear, and they do the right thing.
Daniel.
