Think about Loose Coupling | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
There are at least four commonly used calling conventions for named arguments in existing Perl 5 code:
In addition, people like to mix positional arguments with named arguments, for example from AnyEvent::HTTP:
No, introducing %_ doesn't even begin to cover the use cases that are out in the wild, and it's another legacy feature that needs to be supported when/if proper routine signatures are introduced. And that is the thing that should be done. There are several promising modules on CPAN that provide proper routine signatures, most of which converge on the syntax that Perl 6 uses. Getting one of them rock solid and into core Perl 5 would be a much better solution. (And I believe people are working on it already). In reply to Re: Why doesn't Perl provide %_ as the hash equivalent of @_ in subs?
by moritz
|
|