2009/12/13 Petr Baudis <[email protected]>: > On Sun, Dec 13, 2009 at 12:15:42PM +0100, Rémi Coulom wrote: >> If I understand correctly, you are refering to that loop: >> >> for (int i = Max; --i >= Min;) >> >> It starts at Max - 1, not Max. >> >> I am pretty confident this part is correct. Otherwise, it would have >> generated obvious errors. > > Oh, I'm sorry, you are right, it's obvious when I look at it after good > night sleep. ;-)
A few years ago I could have written that loop the same way, but now I think this is significantly easier to read: for (int i = Max-1; i>=Min; --i) My job involves being called at 3 o'clock in the morning because a program is doing the wrong thing, and this has made me develop an enormous appreciation for clarity. I prefer code that is still obvious when you haven't had a good night sleep. Álvaro. _______________________________________________ computer-go mailing list [email protected] http://www.computer-go.org/mailman/listinfo/computer-go/
