Quote:Original post by phantom
Depends on your metric of 'better'; if I'm scanning code and debugging then all I need to know is that I got into that block because 'num' is greater than 5. I don't care HOW it got greater than 5 just that it is.
When scanning code you process a line at a time, the lower the information on that single line the faster you can process.
By introducing the '++n' into it you are forcing the reader to slow down and de-mangle the line in order to understand what is going on. It's needless noise in the line which would be better pulled out for clarity and easier refactoring later if you got beyond needing a trival '++' operation.
That certainly does make sense; debugging is much easier with simple lines.