Are array and hash representations really needed in subroutine signatures?
Are array and hash representations really needed?
Currently, "@foo" is proposed as the array representation. "%foo" is proposed as the representation of the hash.
Are array and hash representations really needed?
Currently, "@foo" is proposed as the array representation. "%foo" is proposed as the representation of the hash.
I'm Perl Programmer. I LOVE Perl. I want to contribute Perl community and Perl users.
Yes. These do not represent just arrays and hashes, but "slurpy" parameters. This is the way to indicate that you want to accept any number (or zero) additional parameters. Hashes are a way to accept the extremely common named parameter pair convention, though named parameters will be an explicit feature soon as well.
OK, I don't hate "slurpy" parameters.
This is one opinion,
because I want perl core team to think about complexity of implementation and specification.
"Considering what to do with arrays and hashes, implementation and specifications become complex".
In my experience, keeping things simple often leads to good results.