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

Re: postfix dereference syntax

Thread Previous | Thread Next
Ricardo Signes
August 30, 2013 01:57
Re: postfix dereference syntax
Message ID:
* Father Chrysostomos <> [2013-08-19T16:41:42]
> Ricardo Signes wrote:
> > We allow ->@* at the end of an expression that we would've allowed up to
> > that point.  Of your examples above, which I've taken the liberty of
> > numbering, #1 and #2 qualify.  Of the rest, none do.
> ...
> > So: "@{ $foo->[0] }" isn't so bad; generic interpolation form
> Your response comes across as a bit ambiguous.

Sorry for the navel-gazing (although I'm glad I got it on record) and for the
delay in replying.

> So will ->@* and ->@[ and ->@{ interpolate?

I think they should, as described, when at the end of an existing parsed
expression.  We should intuit that there is more to an expression in the above

> If so, what will the feature feature be called?  (Yes, we need a fea-
> ture feature for that.)

I agree that we at least need a feature for interpolation.

> If we have a feature feature, then should it govern the new syntax
> altogether, or just its interpolation?

I think we should have it govern only interpolation.  There would be no reason
to disable it for the other form.  Given that, I'd call the feature
interpolate_postderef.  I think.  Got a better suggestion.

I'm open to the argument that this feature should not go in :5.20, although I'd
certainly turn it on.


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