In one C++ coding style guide, I found one particular recommendation (page 41, recommendation number 53):
Always have non-lvalues on the left side (
0 == iinstead ofi == 0).
And I don't uderstand what is this good for? Are to sticking to this practice?
I'm not and I don't know why is his a good practice. The only advantage I can think of is that is will avoid mistaking an unintentional assignment with a comparison (if (foo = 0){} versus if (foo == 0){})
Have you got any other ideas why should I use it?
