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


Thread Previous | Thread Next
March 3, 2015 13:16
Message ID:

> 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).


Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About