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

Re: Pre-RFC: Phaser Expressions

Thread Previous | Thread Next
David Nicol
November 18, 2021 04:32
Re: Pre-RFC: Phaser Expressions
Message ID:
I don't like it.

That said, if we must do this I'd like to see it postfix, like the other
non-bracketing modifiers that happen and ends of expressions, which are if,
while, unless, for, and possibly something else I missed. We would
introduce a new postfix expression keyword, "at" or "during" or "atphase"
or something like that, of the same class as postfix if and friends, and it
would only be syntactically correct when followed by one of the "phasers."

it would look like this:

my $initialized = 1 at INIT;

That's my two sunken rai stones.

On Wed, Nov 17, 2021 at 1:59 PM Branislav Zahradník <>

> You got it little bit wrong. I'm not talking about treating phasers as a
> value expressions
> I'm talking about new grammar rule, shortly speaking:
> statement: variable-list '=' BEGIN block;
> vs
> statement: BEGIN variable-list = expression
> in both cases you (or someone who will implement this) has to some kind of
> AST transformation
> (I know, perly doesn't have AST layer) so expressions with different then
> BEGIN will make sense:
> INIT my $initialized = 1;
> vs.
> my $initialized = INIT {  1  };
> first variant will be misleading (especially for newbies - yes, I still
> believe that there is a willingness to attract some)

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

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