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

Re: postfix dereference syntax

Thread Previous | Thread Next
David Nicol
July 4, 2013 05:29
Re: postfix dereference syntax
Message ID:
On Wed, Jul 3, 2013 at 4:08 PM, Ricardo Signes
<> wrote:

> In the past, I also suggested:
>   $aref->@{}
>   $href->%{}
>   $cref->&{}
>   $gref->*{}
>   $sref->${}
> ...because these mirror the names of the overloads for these derefs.

Right now, circumfix dereference is


for all sygills S.

Are there any syntax collisions if this is simply allowed postfix,
with empty braces, and
all the slicing and so on remains the same?

        expr->S{}    # new-style S{expr}

        $HoHoA->{abc}{def}@{}[1,2,3]   # new-style @{$HoHoA->{abc}{def}}[1,2,3]
        $HoHoA->{abc}{def}${}[2]   # new-style ${$HoHoA->{abc}{def}}[2]

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