Thomas Hruska wrote: > What everyone to date has failed to point out is that the discussion is > pointless if the next person who has to maintain your code doesn't > understand it. Always write code such that the next person who has to > maintain it is a serial killer and knows where you live. > Therefore...which is less likely to get you killed: > > x = i * j++; > > OR: > > x = i * j; > j++; >
Good analogy. Sometimes combining statements into one, using shorthand, increments, etc. can earn you geek points: unfortunately, it obfuscates the code, and it is likely that it compiles to the same machine code anyway. Even if it does not, you may lose an immeasurable amount of performance but gain quite a bit of readability and understandability. This goes along with the design philosophy that every line of code needs a comment: even if that comment is for an entire block. -- John Gaughan http://www.jtgprogramming.org/
