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

Re: Pre-RFC: Phaser Expressions

Thread Previous | Thread Next
November 16, 2021 10:57
Re: Pre-RFC: Phaser Expressions
Message ID:
> > 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 Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About