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

Re: postfix dereference syntax

Thread Previous | Thread Next
From:
David Nicol
Date:
July 4, 2013 05:29
Subject:
Re: postfix dereference syntax
Message ID:
CAFwScO_NYOfUGYPY_yxfPyf2ReDyocvODWmTzeTUdiJZA-j-VQ@mail.gmail.com
On Wed, Jul 3, 2013 at 4:08 PM, Ricardo Signes
<perl.p5p@rjbs.manxome.org> 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

            S{expr}

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


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About