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

Re: postfix dereference syntax

Thread Previous | Thread Next
Ricardo Signes
August 14, 2013 01:45
Re: postfix dereference syntax
Message ID:
* Father Chrysostomos <> [2013-08-13T21:16:27]
> I have added it, applied the tests to the branch, and fixed a few
> typos in the test script.

I also think, and I imagine this will raise some hackles, that we should
support this syntax in interpolation.

That is:  $x->@* should be co-equal with @$x, which includes "$x->@*" acting as

So, there is an obvious backward compatibility concern.  Users may have

  "Some sort of $foo->@*"

  "Or maybe $x->$*" <-- would issue $* deprecation and mean "$x->" . undef

  "Or $x->@{....}"

...or a number of other structures.  In almost all cases, I feel that we have
nothing to fear.  The first example, really, is going to be a non-issue.
Unfortunately, the third most likely is:

  "$x->@{ \@b }"

What does "everybody else" think about permitting this?  Presumably we would
need to hide it behind a feature flag, unfortunately.

> Now we just need documentation.

I will look at producing some, if no one beats me to it.


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