develooper Front page | perl.perl5.porters | Postings from July 2013

Re: postfix dereference syntax

Thread Previous
Ricardo Signes
July 2, 2013 12:34
Re: postfix dereference syntax
Message ID:
* Nicholas Clark <> [2013-07-02T07:12:36]
> >   print "Things: $aref_of_things->@*"
> > 
> > ...which gets into less clearly-introduceable behavior.
> This is "less clear" because right now that parses as
> print 'Things: ' . $aref_of_things . '->@*'
> not as a syntax error? ie we're changing the meaning of something valid.


> Are there parsing ambiguities with a colon? Particularly, if a colon is
> expected because the opening '?' of a ternary has been seen, does this
> confuse things?

Colon was another suggestion that had been made, specifically $x->:@

I don't believe it's likely to be ambiguous, because the -> can't dangle in
front of a ternary's colon.


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