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

Re: RFC: Multiple-alias syntax for for

Thread Previous | Thread Next
From:
David Nicol
Date:
June 14, 2021 13:52
Subject:
Re: RFC: Multiple-alias syntax for for
Message ID:
CAFwScO_71ADvjicX6VpmotCq4LA3_2GkxuWsaBW_QVN57gzJZQ@mail.gmail.com
On Mon, Jun 14, 2021 at 4:22 AM Nicholas Clark <nick@ccl4.org> wrote:

>
> I don't think that we have any way to emulate this syntax for earlier
> Perls. I don't have any feel for what sort of API we would need to add to
> the parser to make it possible in the future, and whether any API we could
> add would be fragile and tightly coupled to the exact current
> implementation.
>


this, like most all syntax extension proposals, could be done with a robust
macro system which would hook the "for" keyword and own the parser for a
few tokens. As to aliases instead of copies, it seems it would rely on
lexical aliasing unless the macro system was outputting to a deeper level
than a miniperl.



-- 
"Lay off that whiskey, and let that cocaine be!" -- Johnny Cash

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