As your future colleague wondering what the hell that variable is for, thanks Go.
Changing it will bring down the entire system.
We’ve spent ten million dollars and do not know why.
Isnt the syntax highlighting it as mever used?
So why would they wonder?
I prefer for it to be just a warning so I can debug without trouble, the build system will just prevent me from completing the pull request with it (and any other warning).
Go is not a programming language. It’s an angry rant of a bored Google engineer.
IDK, Brainfuck is still classified as a programming language and Go is not that far behind it.
If this language feature is annoying to you, you are the problem. You 👏are 👏 the 👏 reason 👏 it 👏 exists.
I worked in places where the developers loaded their code full of unused variables and dead code. It costs a lot of time reasoning about it during pull request and it costs a lot of time arguing with coworkers who swear that they’re going to need that code in there next week (they never need that code).
This is a very attractive feature for a programming language in my opinion.
PS: I’m still denying your pull request if you try to comment the code instead.
❗️EDIT: A lot of y’all have never been to programming hell and it shows. 🪖 I’m telling you, I’ve fixed bayonets in the trenches of dynamically typed Python, I’ve braved the rice paddies of CICD YAML mines, I’ve queried alongside SQL Team Six; I’ve seen things in production, things you’ll probably never see… things you should never see. It’s easy to be against an opinionated compiler having such a feature, but when you watch a prod deployment blow up on a Friday afternoon without an easy option to rollback AND hours later you find the bug after you were stalled by dead code, it changes you. Then… then you start to appreciate opinionated features like this one. 🫡