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

Re: Pre-RFC: Phaser Expressions

Thread Previous | Thread Next
From:
=?UTF-8?Q?Branislav_Zahradn=C3=ADk?=
Date:
November 16, 2021 10:57
Subject:
Re: Pre-RFC: Phaser Expressions
Message ID:
CAB=rbOkbR1Bn7b7iwNbQKHBuad57PS4VEB3G3grLEe0Dz9fbCg@mail.gmail.com
>
> > my ($list, $of, @constants) = BEGIN { ... };
>
> Something like this doesn't solve half of what this proposal is meant
> to. While the return from the BEGIN would be calculated at compile
> time, the variables would still not be populated until runtime. So
> later attempts to use the variables at compile time would find the
> variables uninitialized. This is what the expression prefix form is
> meant to solve. Without the braces, the variables can be populated at
> compile time without changing their scope.
>
>
such syntax follows KIM (referencing latest Ovid's article)
More, such syntax may be usable also for another keywords, not only my, but
also our, state, local

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