Luke Palmer asked:

Presuming you can do:

(who => $name, why => $reason) := (why => $because, who => "me");

(from A6)

Does that imply that you can do:

sub routine (name => $nombre, date => $fecha) {...}

If we're consistent about lvalues of binds being the same as argument lists, it probably does.


Anyway, I just realized that this is finally an elegant way to do
multiple, unordered return values:

(name => $name, id => $id) := getinfo();

Yep.



(Or, in this precise case:)

(+$name, +$id) := getinfo();

Err, no. Or at least: "Please, No!". ;-)


That would certainly be a way cool abbreviation, but I suspect it would be a Very Bad Idea for unary plus to have two unrelated meanings out in the actual code. I suspect that the "named-only" markers are only available within actual parameter lists.

Damian



Reply via email to