On re-reading, you're right. My fault for giving them the benefit of the doubt. One letter variables? I'm a little bit speechless.
I don't recommend one letter variables. I don't know if I've ever seen an official style guide that has.
I don't recommend one letter variables. I don't know if I've ever seen an official style guide that has.
Not that familiar with idiomatic Ruby, but using one letter variables as iterators in for loops (and some other things) is pretty idiomatic C:
int i;
for (i = 0; i < queue_size; i++)
queue[i] = get_rarest_peer(t->peer_list); [1, 2, 3].each { |e| puts e }
Object.methods.each { |m| "Method is: #{m}" } [1, 2, 3].each { |value| puts value }
Object.methods.each { |method| "Method is: #{method}" }
I consider that a better habit to have than using single-character variables. And style guides should be about encouraging the best habits possible.