My general rule is to reuse a variable when the old value is no longer needed
Taken at face value that is terrible advice. A large part of understanding code is understanding the role of variables at any particular point. That is why choosing good variable names is important.
If the role of the variable changes through the code then understanding the code becomes much harder. So maybe that wasn't what you meant by that statement?
In reply to Re^2: Coding style: truth of variable name
by GrandFather
in thread Coding style: truth of variable name
by perlancar
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |