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?

3 Comments

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.

Leave a comment

About Yuki Kimoto

user-pic I'm Perl Programmer. I LOVE Perl. I want to contribute Perl community and Perl users.