develooper Front page | perl.perl5.porters | Postings from March 2015

Re: OP_SIGNATURE

Thread Previous | Thread Next
From:
perl
Date:
March 3, 2015 13:16
Subject:
Re: OP_SIGNATURE
Message ID:
54F5B423.80409@profvince.com

>
> OP_SIGNATURE *is* aimed at the "semantic activity of extracting
> arguments", and is not tied to one particular syntax. Part of the proof of
> that is that it can be used to implement my(...) = @_ syntax in addition
> to handling the current signature syntax. It can be used anywhere
> where the contents of @_ need to be assigned to a list of my() variables
> (modulo the optimisation which requires fresh lexicals) with optional arg
> count error checking and default value assignment.

By the way, do you have an idea about why do you get a performance gain 
with OP_SIGNATURE as compared to the previous padrange optimization 
which, if I remember correctly, can already handle "my (...) = @_" in 
one op? (disclaimer: I'm neither for or against the proposal. I'm just 
curious about what could cause such a dramatic improvement when padrange 
seems at first glance conceptually much simpler).


Vincent

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About