bearophile <[email protected]> wrote in news:[email protected]:
> 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++; In C++, at least, I have often seen recommendations that say post increment/decrement should be avoided in favor of pre increment/decrement. The rational is that overloaded pre increment/decrement can be implemented more efficiently for complicated types---there is no need to create a temporary (you mutate the object and then return a reference to that same object). Thus I've trained myself to use pre incremenet/decrement throughout my C++ code except in cases where I explicitly need the post versions. Of course what's good for C++ does not have to be good for D. However, deprecating the pre versions might turn off some potential D converts from the C++ community. Peter
