If you use I,j,k… what do you do if you need another? I hate seeing lowercase l as a var.
If i is lowercase too then it doesn’t make a difference
But tbh if your function is having mit than 3 levels of nested loops you should probably rethink that function
… or you just work in 3D …
It depends.
x
andy
are either elements or coordinates,a
andb
usually elements though in e.g. Haskell reserved (by convention) for type variables.The
i
j
k
l
series is reserved for indices.n
m
etc. are the counts of something, as such you’ll seei
counting up ton
. Both are due to mathematical sum notation and general mathematical convention. Random google result:Let x1, x2, x3, …xn denote a set of n numbers. x1 is the first number in the set. xi represents the ith number in the set.
…if you’re using a language in which you use
i
often chances are you should stop coding in C and get yourself a language with iterators. Manual loops are a bug magnet.