in reply to Re^8: Pre vs Post Incrementing variables
in thread Pre vs Post Incrementing variables
"You think that you know better what the authors of that passage meant when they wrote it, than they did." is not an argument.
Oh, but it so is.
Having already attempted to point out the significant difference between your "operand evaluation order"--which appears nowhere in either the quoted passage, nor elsewhere in the post; and the phrase "the order of evaluations of expressions"--which does; and having attempted to give you the benefit if the doubt.
I had to conclude, that your conflation of the two terms was not accidental, but rather, knowing and deliberate. At which point, my conclusion was not "slander", but rather 'paraphrase'.
You said it; in the face of my clear attempt at clarification, you repeated it. I paraphrased you. That isn't "slander", it is fact. Slander has to be false.
Slander also has to be spoken. If it's written, it becomes libel, but it still has to be false, but your conflation of two entirely different terms, was palpable; obvious. My conclusion, unavoidable.
And your confusion, deliberate or otherwise, continues.
You appear to be trying to make a distinction, between:
two references to $n after both sub-expressions have been evaluated.
And:
Correct. It doesn't. It returns $n after the first preincrement has been evaluated and $n after the second preincrement has been evaluated.
But, $n_after_the_first_increment would be different, by 1, to $n_after_the_second_increment, but your own output--in both the relevant case and your two fantasy cases--shows both digits are the same.
And the only way for that to happen, is for both pre-increments to have occurred, before the subroutine gets whatever it is given. And that is self-evidently wrong, sub-expression evaluation order specified or not.
But...(I can see you clasping your hands together in triumph)... if sub-expression evaluation order was specified, then there is no way possible that the current behaviour could be excused under the "Don't use 2 or more side-effectful operations on a single variable, within a single expression" missive.
In other words, in the hope that it will penetrate this time. If the excuse of "unspecified order of sub-expression evaluation" had never existed, then the current behaviour would have been recognised a bug the moment it was implemented.
And one more try.
If the order of evaluation of sub-expressions was defined--whether left to right, right to left, or in the most obvious order of respecting both precedence and parentheses--then the current implementation of passing lvalue references to the target (operand) of sub-expression operations--rather than the results produced by those sub-expressions--would have stood as an indefensible bug long ago.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^10: Pre vs Post Incrementing variables
by ikegami (Patriarch) on Sep 13, 2010 at 14:42 UTC | |
by BrowserUk (Patriarch) on Sep 13, 2010 at 15:10 UTC | |
by ikegami (Patriarch) on Sep 13, 2010 at 15:29 UTC | |
by BrowserUk (Patriarch) on Sep 13, 2010 at 16:00 UTC | |
by ikegami (Patriarch) on Sep 13, 2010 at 16:47 UTC | |
|
Re^10: Pre vs Post Incrementing variables
by ikegami (Patriarch) on Sep 13, 2010 at 15:48 UTC | |
by BrowserUk (Patriarch) on Sep 13, 2010 at 16:10 UTC | |
by ikegami (Patriarch) on Sep 13, 2010 at 16:25 UTC | |
|
Re^10: Pre vs Post Incrementing variables
by JavaFan (Canon) on Sep 13, 2010 at 09:02 UTC |