develooper Front page | perl.perl5.porters | Postings from June 2022

Re: goto and @_

Thread Previous | Thread Next
Paul "LeoNerd" Evans
June 3, 2022 19:19
Re: goto and @_
Message ID:
On Fri, 3 Jun 2022 18:50:19 +0200
Ovid <> wrote:

> Is there a plan for this?


It's known and noted that tailcalls don't work with "no snails"

I have thoughts on adding a `tailcall` to address it, so your code
would become:

    use SOMETHING 'tailcall';

    sub import ( $class, @args ) {
        my $real_import = get_real_import();
        # do stuff
        tailcall $real_import->( $class );

Quite where that comes from I don't know. It can't just be a `builtin`
because it's not just a regular function. It'd have to be something
else - maybe a `use feature` or somesuch.

Paul "LeoNerd" Evans      |  |

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