in reply to Re^10: Pre vs Post Incrementing variables
in thread Pre vs Post Incrementing variables

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
  • Comment on Re^11: Pre vs Post Incrementing variables