http://www.perlmonks.org?node_id=633645


in reply to what would you like to see in perl5.12?


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

Replies are listed 'Best First'.
Re^2: what would you like to see in perl5.12?
by gaal (Parson) on Aug 09, 2008 at 16:21 UTC

      I'm not quite sure what Perl6::Declare has to do with improving teh performance of sub calss in Perl5?

      Of course, that might in part be due to my being unable to find any even vague description of what Perl6::Declare does? Of the 11 links turned up by the provided Google search: 3 are in japanese (or Chinese?); 4 are links to random points in some SVN repository or another; 3 are apparently Twitter logs for someone or something called "Jaiku"; and the last is this.

      I pursued the link associated with the only mention of Perl5-Declare on that page through half a dozen or so branches, but never did find any further reference. And a cpan search turned up nothing either.

      So, if you have a better link it would be appreciated. Otherwise, a brief explanation of how adding method signatures improves performance?


      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      "Science is about questioning the status quo. Questioning authority".
      In the absence of evidence, opinion is indistinguishable from prejudice.
        Oh, you meant runtime performance! Sorry, I completely failed to recognize that. I thought you meant the clunkiness of Perl 5 subroutine argument processing:

        my ($foo, $bar, $baz); # oops, forgot " = @_" my ($foo, $bar, $baz) = shift; # oops, used shift() instead of +"@_" my $single_arg = @_; # oops, will usually be 1

        Perl6::Declare lets you declare subroutine/methods using Perl 6 signatures, which are lovely. I heard this turns out to actually be faster than Perl 5 calling conventions, but I can't say I fully understand why this is so.