News for hackers. Stuff that matters.
Re:A Dictionary of Single-Letter Variable Names by bluerooibos on Monday October 14, 2024 @07:48PM (#41843469)
I'd prefer i to be a description/name of the thing that is being iterated.

If your array is named cars then you can safely assume i will be a car, but depending on the complexity of the code it just adds another step for me to parse, when I could have just named it car to begin with.

That's a simple case where the data being iterated over is clear. When the data is complex, it becomes even more useful to descriptively name i so that you can more easily see what you're working with.

Re:A Dictionary of Single-Letter Variable Names by eutectic on Tuesday October 15, 2024 @11:24AM (#41849565)
But 'i' is not a car, it is the index of a car.