Re:Practical Go: Real-world advice for writing maintainable ...
by yawboakye on Friday February 22, 2019 @07:49AM
(#19224850)
Rarely do you have a case where a variable outgrows its simple name (and value) and you keep it the same. Even when a function adopts new characteristics it's advisable to change it's name or make a new one. If you initially had variable `i`, created and destroyed in 5 lines of code but that has grown to 20+ lines, I'd recommend you (1) not add the 15+ if it could be put in a function (you get to name that section of the code), or (2) rename the variable. But a 5-line code that becomes 20+ lines is both strange and interesting.
[ Parent
| on HN ]
There are no comments on this comment yet.