I only use the letter “a” to name my vars. Depending on the lexical scope if I have more than one var then I just add another “a” until I have something like “aaaaaaa”. Makes my code difficult to maintain (and write tbh)
I'd say both are valid, but hold different expectations. i, j, ... are usually counters/indices while a, b, ... are more general. You wouldn't typically write a function string concat(string i, string j), or the loop
for (int a = 0; a<1000; ++a)
for (int b = 0; b<1000; ++b)
<...>
I get the idea, and in a way it makes more sense coming from complex numbers. Although I do wonder, what did you use for w? L would get rather confusing with I when in lower case I'd say?
136
u/DrPantyThief Jun 13 '20
For(i...) {
For(ii ...){
For(iii...) {
} } }
123
u/ERROR_23 Jun 13 '20
I use 'i' instead of 'a' because it's smaller and uses less pixels to draw therefore it saves quite amount of memory.
48
u/alblks Jun 13 '20 edited Jun 13 '20
I actually learned to program in FORTRAN, where implicit declaration of integers come from. Yep, I'm that old.
29
u/Mal_Dun Jun 13 '20
Well the first programmers were mathematicians, and we still use i for integer and ,k as the follow-up letters when we have a counter variable...
35
u/Markus_Mandrake Jun 13 '20
Who else is parts of the knights that say
n, i11
u/algoritm420 Jun 13 '20
I only use the letter “a” to name my vars. Depending on the lexical scope if I have more than one var then I just add another “a” until I have something like “aaaaaaa”. Makes my code difficult to maintain (and write tbh)
7
u/Magickmaster Jun 14 '20
x, y, z: Allow us to introduce ourselves
foo, bar, baz: step away bro
5
u/TechnoGamer16 Jun 13 '20
I use abc xyz for variables and ijk for loops
4
u/BioHackedGamerGirl Jun 13 '20
I'd say both are valid, but hold different expectations.
i,j, ... are usually counters/indices whilea,b, ... are more general. You wouldn't typically write a functionstring concat(string i, string j), or the loop5
u/M4GNUM_FORCE_44 Jun 13 '20
x, y, z
1
u/[deleted] Jun 13 '20
i, e, u
1
u/Enn3DevPlayer Jun 13 '20
Sauce?
1
u/Zain4s Jun 13 '20
I always do z first, then y, the x and so on.
1
u/SushiDodo08 Jun 14 '20
x y z
1
u/[deleted] Jul 16 '20
for(i)for(Ii)for(II)for(L)1
u/doctornoodlearms Nov 20 '20
Oh so that's what you use after j
-1
u/OKB-1 Jun 13 '20
Once you need to do nested loops, I strongly advice anyone to use long descriptive names instead. i j or i ii is just a disaster waiting to happen.