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

But, by far the most damaging thing is the impermanence of 90%(+?) of the recent new features.

There are statements above to the effect of: "But postfix deref is okay. It won't go away"; but find anyone who would admit that smart-match was half baked for the first 3 years of its existance; yet even after numerous re-writes ...

Once, twice, thrice, force, fivce times bitten -- never again. If postfix deref actually simplified or clarified anything; maybe you'd take a punt on it; but (IMO) it doesn't.

If find the justifictions("Stylistically the circumfix operation is ugly.") for postfix deref utterly specious. For me it is the syntactic equivalent of the form:

I really, really like you xyz and think that you should be commended and rewarded for your contribution; Not!

It puts the most important part of the statement at the end; after you've committed hari-kari from boredom plowing through all the details.

At a glance, this: push @{ $deep_array_ref->[0][0][0][0] }, 4; reads as "push 4 into an array. And at first glance that's all I need to know.

And when I need to know more, like which array, I know its the bit between @{ and }; all nice and cleanly delineated.

With this: push $deep_array_ref->[0][0][0][0]->@*, 4; I cannot see the wood for the trees. There's no delineation of the purpose of the statement and the details of its implementation. Its just one big mess of underscores and minus signs and zeros with a splodge on the end.

It does nothing new; nor simpler; nor cleaner. As such, and given the history, why would anyone take the risk.


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
I'm with torvalds on this Agile (and TDD) debunked I told'em LLVM was the way to go. But did they listen!

Replies are listed 'Best First'.
Re^8: Experimental features: autoderef vs postfix deref
by Anonymous Monk on Jul 14, 2015 at 01:18 UTC
    push @{ $deep_array_ref->[0][0][0][0] }, 4;
    Surely you mean
    push @{ ${ ${ ${ ${$deep_array_ref}[0] }[0] }[0] }[0] }, 4;
    If you don't mean that... I don't know why postderef upsets you so much. It's just like, you know, the rest of that syntax.

      Heh. Too subtle, I guess. Neither of them "got" it. Well, one of them is probably just trolling their (pretend) lack of understanding.

      - tye        

      Surely you mean

      Nope. Go look.

        Wow, code examples not viewable without javascript -- a sure sign of quality opinions
        Indeed I don't believe you don't understand. But, just in case:
        $foo->{bar}->{baz}->{quux}; $foo->{bar}->{baz}->{quux}->@*; ${ ${ ${$foo}{bar} }{baz} }{quux}; @{ ${ ${ ${$foo}{bar} }{baz} }{quux} };
        I don't see why ->@* in the left-to-right version doesn't enhance readability just as much as the previous part of the expression, compared to the inside-out version. I must also say that writing the inside-out version was difficult for me, and reading it, even more so. If $foo->{bar} is better then ${ $foo }{bar}, then I don't see why $foo->@* isn't equally better then @{ $foo }. You feel differently, so how about you explain why circumfix is worse in some situations, but becomes better 'at the top level'. "I can tell at a glance" isn't a good explanation because slices exist, e.g.:  for ( @{ $foo->{bar} }{"a", "b", "c", "e"} ) .... You can't even tell "at a glance" you're dealing with a hash!

      ... Surely you mean ... If you don't mean that... I don't know why postderef upsets you so much. It's just like, you know, the rest of that syntax.

      You don't even know whats being discussed? Oh boy

        Oh boy, I should've guessed that someone will surely miss the point. Stare at this until you understand:
        $foo->{bar}->{baz}; $foo->{bar}->{barz}->@*; ${${$foo}{bar}}{baz}; @{${${$foo}{bar}}{baz}};