is naming variables with 1 letter a bad habit long term?

When I first started programming, there were a lot of fortran folks who used 1-letter names for everything, presumably due to the historically limited line length? It was awful.

Then in the 90s, it became fashionable to use outrageously_long_symbol_names for everything. reinterpret_cast came into the language around that time. I am thankful this eventually fell out of favour or we'd be stuck with constant_expression and the like.

Personally, I do use 1-letter variable names in a few situations like i in an indexed for loop. There's a convention for that. But in general, I avoid them if there is any ambiguity about what the variable represents.

/r/learnpython Thread