in reply to Re^12: Experimental features: autoderef vs postfix deref
in thread Experimental features: autoderef vs postfix deref

Because its not the top level entity.

push array, value; template

push @{ ... }, 4; Clear example;

push $foo->{bar}->{baz}->%*, 4; ## WTF is that?

Replies are listed 'Best First'.
Re^14: Experimental features: autoderef vs postfix deref
by Anonymous Monk on Jul 14, 2015 at 02:18 UTC
    What is special about toplevel? Does that only work for push or everywhere?

    lvalue = value; template

    ${ $foo->{bar} }{baz} = 4;

    $foo->{bar}->{baz} = 4;

      Does that template exist in the documentation? The one I cited does.

      Why not make your straw man ${ ${ $foo->{bar} }{baz} } = 4? A. Because that would be even more stupid.

      Why not just $foo->{bar}{baz} = 4; the way 90% of people write it? A. because that would highlight how verbosely hieroglyphic the postfix syntax is ->@*.

        Why not make your straw man ${ ${ $foo->{bar} }{baz} } = 4? A. Because that would be even more stupid.
        :-) OK, let's try:
        ${ $foo->{bar}{baz} } = 4:
        Still looks stupid?

        What about:

        @{ $foo->{bar}{baz} }[0, 5] = (3, 4);
        I guess, also too stupid?

        Let's try some more:

        @{ $foo->{bar}{baz} }{ 'John', 'Jane', 'Bill' } = ('Smith') x 3;
        Stupid?

        If not, then why

        ${ $foo->{bar} }{baz} = 4;
        becomes stupid? Maybe because you can actually avoid circumfix dereferencing here?

        Why not just $foo->{bar}{baz} = 4; the way 90% of people write it?
        That's what I'm asking. Why 90% of people try to avoid circumfix when they can?