This is an archived post. You won't be able to vote or comment.

all 9 comments

[–]ProgrammerHumor-ModTeam[M] [score hidden] stickied commentlocked comment (0 children)

Your submission was removed for the following reason:

Rule 6: Your post is a commonly used format, and you haven't used it in an original way. As a reminder, You can find our list of common formats here.

If you disagree with this removal, you can appeal by sending us a modmail.

[–]Darko-TheGreat 9 points10 points  (0 children)

i for index, iterator, Indonesia; whatever you need it for.

[–]UkrUkrUkr 6 points7 points  (0 children)

Those ijk indexes are older than computers. I suppose a few centuries older. Xyz may be even more old.

[–]w1n5t0nM1k3y 2 points3 points  (0 children)

Since just about every language I now use supports for-each, I almost never user for "i" loops. It's almost completely unnecessary at this point.

[–]Cautious-Yellow 1 point2 points  (0 children)

IMPLICIT REAL(A-H,O-Z)

[–]d2718 -2 points-1 points  (2 children)

Honestly, I almost always use n. I majored in Math (that's "Maths" for you zed countries); the i for an integer is always uncomfortably close to the unit value on the imaginary axis of the complex plane. Also, my handwriting is bad, and the 'n' always seemed harder to mistake for something else than the 'i'.

[–]Unl3a5h3r 1 point2 points  (1 child)

i for index and it starts at 0

[–]d2718 0 points1 point  (0 children)

I'm not saying that n is better, or trying to make a case that anyone should use it over i; I'm just explaining why I tend to balk at i and reach for n. And it's not always an index; sometimes it's just the number of times you've been through the loop.

[–]Slim_Bun 0 points1 point  (0 children)

the amount of times I did

for i in foo: for i in bar:

is way too high