If you don't want the alias, create a copy.

It not getting an alias that is the problem is it. It's getting the same alias for two or more different sub-expressions.

And the ID of your bug report is?

There is no point in raising one. Because the problem description would be the OP, and that would be dismissed on the basis of this. Which is underpinned by the passage I quoted here.

The justification is optimization. ... it saves creating a new SV.

And so we come full circle. We're back to "Perhaps the most short-sighted and pervasive premature optimisation ever."

That saving of the creation of a new SV, in the limited cases of pre-increment and assignment operators only--hardly so pervasive in code that it requires optimising--creates the situation that means many useful behaviours are denied the programmer. Along with the resultant contradiction of the principle of least surprise.

It's not going to change now, And I didn't set out to make a case for it to change now. Only to document how it came about in the first place. And then support my assertion that the quoted phrase above is indeed the source of the chain of causality.


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.
RIP an inspiration; A true Folk's Guy

In reply to Re^11: Pre vs Post Incrementing variables by BrowserUk
in thread Pre vs Post Incrementing variables by SavannahLion

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.