Re:Google’s Go Style Guide
by SEJeff on Friday November 18, 2022 @12:37PM
(#33658377)
Yeah i for for loops (in python) x for comprehensions, etc, make sense. But in general, single character variables make code really hard to read.
[ Parent
| on HN ]
Yep, you should just use the best judgement, for example
for distance, time in driving_metrics:
speed = distance / time
is a lot clearer than for d, t in driving_metrics:
s = d / t
even if it's used in a tiny scope once. But some things don't have a valuable meaning, or the meaning can trivially be inferred.