The true horror begins, when the customer calls for support, because some things are awkward, and you know instantly the cause, also that you will have to fix this now, 5 years later.
Sometimes I think it could be easier to just use the variable before its declared and then let the IDE auto fix create it, but I never remember to try it 😂
Just enable format-on-save. That way gofmt can helpfully delete that variable you just added that you were for sure never going to use. You’re welcome!
It’s more language dependent than ide. Go for instance makes unused variables a compiler error (I believe) which means ides mark it as red immediately.
Ts/js can have eslint rules against unused variables but they will still usually compile or just run directly anyway.
Java doesnt error but can be set to warn you on them.
programmer_humor
Oldest
This magazine is from a federated server and may be incomplete. Browse more on the original instance.