develooper Front page | perl.perl5.porters | Postings from September 2012

Re: [perl #114536] Optimize assigning to scalars from @_

Thread Previous | Thread Next
Aristotle Pagaltzis
September 2, 2012 09:01
Re: [perl #114536] Optimize assigning to scalars from @_
Message ID:
* Father Chrysostomos via RT <> [2012-08-31 23:15]:
> One thing you would have to be careful of is &foo-style calls, that
> share @_.
> XS modules can get the caller’s arguments via get_av("_"), and any sub
> call could potentially be an XS call.
> I don’t think this optimisation is possible.

Pardon my ignorance in perlguts, but as far as I can tell within the
reach of my understanding, David’s proposal changes absolutely nothing
about the semantics of @_ in any way whatsoever. I understood his call
to be for a way to do skip the usual “push push push list-assign” grind
required to implement `my ($foo, $bar, $baz) = @_` in terms of the
general-case implementation for assigning to a list – which would have
no effect I can see on the presence or contents etc of @_.

Were all of that correct, then the answer to your objections should seem
to be a simple – so what?

Is it? Am I missing something?

Aristotle Pagaltzis // <>

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