Perl-Sensitive Sunglasses | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
There is something I dont understand in the new Exegesis, namely (page 7 bottom):
This makes no sence to me. Simply because a pair has the same key value as one of the variables on the left side, it is assigned to that? So what if I happen to use this snippet in my "legacy" code: ($goats, $sheep) := part Animal::Cat, @animals Then simply because of my naming of the variables I assign to, I would get the reverse result? (as in, $sheep in this case would contain the same data, as in the case where it was ($sheep, $goats) := ...) Can anyone explain why this is a good idea? But then again, if perl6 changes the order of hashkeys as often as perl5, then it would break with every release anyway ;) I do believe he should have used
Secondly: makes no sence to me either, unless a colon is missing as in
T I M T O W T D I In reply to Exegesis 6 - Named binding by Cine
|
|