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

Re: Tail recursion optimisation considered possible

Thread Previous | Thread Next
From:
Paul LeoNerd Evans
Date:
August 17, 2012 04:56
Subject:
Re: Tail recursion optimisation considered possible
Message ID:
20120817115551.GM19185@cel.leo
On Fri, Jul 13, 2012 at 10:24:45AM -0700, Jan Dubois wrote:
> On Fri, 13 Jul 2012, Aaron Crane wrote:
> > My suspicion is that Perl shouldn't apply any form of call-frame
> > merging without seeing an explicit indication (whether a pragma, or
> > use feature feature, or simply an additional/alternative return
> > builtin) that the programmer is happy for call frames to disappear
> > from what caller() sees.
> 
> Don't we have that alternative return builtin already with:
> 
>     @_ = (...);
>     goto &foo;
> 
> Or are you just talking about syntactic sugar to make this more
> pleasant to read?

https://metacpan.org/module/Sub::Call::Tail

-- 
Paul "LeoNerd" Evans

leonerd@leonerd.org.uk
ICQ# 4135350       |  Registered Linux# 179460
http://www.leonerd.org.uk/

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