bearophile Wrote:

> Removing those operators from D, as Python, may look excessive. So a possible 
> compromise can be:
> - Deprecate the pre versions:  --x  and ++x
> - Make them return void, so they can't be used as expressions like this:
> y = x++;
> foo(x--);
> You have to use them as:
> x++; y = x;
> x--; foo(x);

int PreInc(ref int i){ i++; return i; }
int PostInc(ref int i){ i++; return i-1; }
y=PreInc(i);
y=PostInc(i);

just a little more difficult.

y=x=0;
Ever wondered what opAssign returns?

Reply via email to