|
|
|
|
|
by maze-le
2860 days ago
|
|
Yes, single letter variables do have their place. But this place is very limited. Consider these lines in ruby data.reject{|e| e.value.nil?}
data.reject{|element| element.value.nil?}
I would always prefer the first one. My general rule of thumb is: If a variable has the scope of exactly one line, or if it is an incremental counter, use one letter. |
|