On Tue, 05 Jun 2012 10:23:18 +0200, Mikael Lindsten wrote:
2012/6/5 Jonathan M Davis jmdavisp...@gmx.com
I think that Bernard is being a bit harsh, but in essence, I agree.
Since the
evaluation order of arguments is undefined, programmers should be aware
of that
and code accordingly. If
On 4 June 2012 23:37, Jonathan M Davis jmdavisp...@gmx.com wrote:
On Monday, June 04, 2012 23:22:26 Bernard Helyer wrote:
On Monday, 4 June 2012 at 20:44:42 UTC, bearophile wrote:
Bernard Helyer:
If you find yourself using postfix increment/decrement
operators in the same function call in
On 06/04/2012 08:36 PM, Xinok wrote:
The increment and decrement operators are highly dependent on operator
precedence and associativity. If the actions are performed in a
different order than the developer presumed, it could cause unexpected
behavior.
I had a simple idea to change the behavior
2012/6/5 Jonathan M Davis jmdavisp...@gmx.com
I think that Bernard is being a bit harsh, but in essence, I agree. Since
the
evaluation order of arguments is undefined, programmers should be aware of
that
and code accordingly. If they don't bother to learn, then they're going to
get
On Mon, 04 Jun 2012 20:36:14 +0200, Xinok xi...@live.com wrote:
The increment and decrement operators are highly dependent on operator
precedence and associativity. If the actions are performed in a
different order than the developer presumed, it could cause unexpected
behavior.
I had a
If you find yourself using postfix increment/decrement operators
in the same function call in multiple arguments, slap yourself
firmly in the face and refactor that code.
On Mon, 04 Jun 2012 20:57:11 +0200, simendsjo simend...@gmail.com wrote:
On Mon, 04 Jun 2012 20:36:14 +0200, Xinok xi...@live.com wrote:
The increment and decrement operators are highly dependent on operator
precedence and associativity. If the actions are performed in a
different order
On Monday, 4 June 2012 at 20:08:57 UTC, simendsjo wrote:
Oh, and what should writeln(i++, ++i, ++i, i++) do?
It is messy whatever the logic implementation.
For prefix operators, it would be logical to perform the action
before the statement, such as the code would be rewritten as:
++i
++i
Bernard Helyer:
If you find yourself using postfix increment/decrement
operators in the same function call in multiple arguments, slap
yourself firmly in the face and refactor that code.
I think this is not acceptable, you can't rely on that, future D
programers will not slap themselves and
On Monday, 4 June 2012 at 20:44:42 UTC, bearophile wrote:
Bernard Helyer:
If you find yourself using postfix increment/decrement
operators in the same function call in multiple arguments,
slap yourself firmly in the face and refactor that code.
I think this is not acceptable, you can't rely
On Monday, June 04, 2012 23:22:26 Bernard Helyer wrote:
On Monday, 4 June 2012 at 20:44:42 UTC, bearophile wrote:
Bernard Helyer:
If you find yourself using postfix increment/decrement
operators in the same function call in multiple arguments,
slap yourself firmly in the face and refactor
Jonathan M Davis:
If they don't bother to learn, then they're going to get
bitten, and that's life.
A modern language must try to avoid common programmer mistakes,
where possible (like in this case).
As for treating pre or post-increment operators specially in
some manner, that
doesn't
On Monday, 4 June 2012 at 20:44:42 UTC, bearophile wrote:
1) Make post/pre increments return void. This avoid those
troubles. I think Go language has chosen this. This is my
preferred solution.
I wonder in that case, is it even worth including in the
language? For me anyways, the whole point
On Jun 4, 2012 8:43 PM, Xinok xi...@live.com wrote:
I wonder in that case, is it even worth including in the language? For me
anyways, the whole point of these operators is to use them in expressions.
Otherwise, why not simply write (i+=1)?
For pointers they are useful because they go up in
14 matches
Mail list logo