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

Re: [perl #24250] "return" required in some anonymous closures

April 20, 2012 04:44
Re: [perl #24250] "return" required in some anonymous closures
Message ID:
Nicholas Clark wrote:
>So, do we want to remove the inlining of (inferred to be)-constant value

Inlining of *actual* constant-value subs should remain, but "sub () {
$x }" should not be perceived as constant-value.  We should replace
that mechanism by an explicit generator for constant-value subs of
runtime-specified value (trivially implemented in XS).

I've been wondering where the inlining really ought to be implemented.
With the call-checker mechanism, maybe the inlining of constant-value
subs should be exposed as a non-standard call checker, rather than
marring the standard code with an awkward special case.

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