Whenever I write code, regardless of the language, I try to use the operations that make since and aid in reading of the code.
To me ++ and -- mean to go on to the next value/item or return to the previous value/item.
So I use them in that context. Sometimes doing:
doesn't really make a lot of sense. For example lets take the often misunderstood pointer arithmatic:
Code:
int x[10] = {0,1,2,3,4,5,6,7,8,9};
int *ptr = x;
ptr = ptr + 1;
Now for those of us that have studied it that bit of code doesn't confuse us. However take a newbie and show them that code and they'll look at you crossed eyed and drooling. I know because I've seen it in those that I've tutored.
Now if you were to show them this:
Code:
int x[10] = {0,1,2,3,4,5,6,7,8,9};
int *ptr = x;
ptr++;
Most would understand that ptr is now pointing at the next element.
Now onto += and the like. The real benefit is not having to type out the name twice and taking the risk of mispelling it. I see nothing wrong with using them as they are very clear in their operation.
As for your while loop example, it might not be the prettist but sometimes it can be the best.
For example say you have a main loop in your program that does the processing as it becomes available. Half way through the middle of the loop you have some type of exit condition (maybe due to an exit code or fault). Now this condition doesn't exist at the beginning of the loop. So where do you place the conditional?
With a few expections for things like gets() pretty much anyone who says not to use a tool needs to be shot. Just because they are too stupid to know how to use the tool properly doesn't mean its a faulty tool.