Front page | perl.perl5.porters |
Postings from June 2022
Re: goto and @_
Thread Previous
|
Thread Next
From:
Paul "LeoNerd" Evans
Date:
June 3, 2022 19:19
Subject:
Re: goto and @_
Message ID:
20220603201926.5d79d287@shy.leonerd.org.uk
On Fri, 3 Jun 2022 18:50:19 +0200
Ovid <curtis.poe@gmail.com> wrote:
> Is there a plan for this?
Ish.
It's known and noted that tailcalls don't work with "no snails"
currently.
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
leonerd@leonerd.org.uk | https://metacpan.org/author/PEVANS
http://www.leonerd.org.uk/ | https://www.tindie.com/stores/leonerd/
Thread Previous
|
Thread Next