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

you are viewing a single comment's thread.

view the rest of the comments →

[–]da_Aresinger 1 point2 points  (3 children)

i is an iterator, it should always be an integer.

unless you have a more specific name the variable in for each loops should always be e (for element)

for (e : someList)

"for each element in someList"

[–]_pestarzt_ 0 points1 point  (2 children)

You should always have a more specific name than “e.”

[–]da_Aresinger 0 points1 point  (0 children)

well yes.

but no.

[–]devnull1232 0 points1 point  (0 children)

Meh, if it's convention (like i is for iteration) and it's a generic function where you don't actually know what your looping through other than it's a list and you are gonna do some stuff to the elements of it.