4 ms·
I too abhor single-letter variable names. My personal convention: minimum identifier length==2. {i,j,k}->{ix,iy,iz}, c->ch.
by cagey 10y ago
I too abhor single-letter variable names.
My personal convention: minimum identifier length==2. {i,j,k}->{ix,iy,iz}, c->ch.
- ambulancechaser 10y agoI'm all for descriptive names but do you really not like iterator variable names like i,j,k or x,y,z? You prepend them i (for integer i suppose)?
- bpicolo 10y agoI tend to call them index. If the loop is nested I grab functions to call inner bits. i and j especially can get crazy muddled coexisting (could you even pick two more similar letters? Capital I and l depending on the font maybe?). In general, much prefer languages where I don't ever have to index. E.g. list comprehensions are much more expressive
- ArkyBeagle 10y agoIn FORTRAN 64, variable names were significant. I was an integer, F was a float, that sort of thing. This created habits that persist to this day.
- cagey 10y agoactually i for "index" ('ix'->'index x'), not "integer"