News for hackers. Stuff that matters.
Re:John Carmack on Mutable Variables by throwaway2037 on Thursday November 06, 2025 @06:44PM (#45841964)

    > you use ++def in a loop, don't be weird
I come from a C++ background where it is always advised to use ++i instead of i++. It's just a habit. Does it stress you to read ++i over i++?
Re:John Carmack on Mutable Variables by xxs on Monday November 10, 2025 @04:27AM (#45874168)
>Does it stress you to read ++i over i++?

Of course not, I do use both. Admittedly i++ is a lot more common in Java, and for loops i++ is the standard idiom. Not using the standard idiom usually implies less practice, e.g. str.indexOf('x') < 0 is the standard one, not == -1. Even the backwards iteration is a postfix subtraction::

  for (int i = array.length; i-- > 0;) doStuff(array[i]);