▲ 1429 ▼ Golang be like (i.imgur.com) submitted 3 years ago by mycroftholmess@lemm.ee to c/programmer_humor@programming.dev 137 comments fedilink hide all child comments
[–] aport@programming.dev 9 points 3 years ago (1 child) You mean a system like the compiler permalink fedilink source parent hideshow 2 child comments replies: [–] MJBrune@beehaw.org 14 points 3 years ago* (1 child) Or a linter. Or code reviews. Or anything else. The nice thing is that if the compiler doesn't demand something, it can be given to the engineer as an option. The compiler should have the option to do it. The option could even be defaulted on. Afaik there is no way in Golang to disable that error (this is the line that does it: https://github.com/golang/go/blob/04fb929a5b7991ed0945d05ab8015c1721958d82/src/go/types/stmt.go#L67-L69). like --no-pedantics or such. Golang's compiler openly refuses to give engineers more choices in what they think is the best system to handle it. permalink fedilink source parent hideshow 2 child comments replies: [–] aport@programming.dev -5 points 2 years ago (1 child) Who needs an option to leave unused variables around the code base? Lazybones? permalink fedilink source parent hideshow 2 child comments replies: [–] MJBrune@beehaw.org 5 points 2 years ago You've literally never commented out a line or two but left the variable declaration while debugging? permalink fedilink source parent
[–] MJBrune@beehaw.org 14 points 3 years ago* (1 child) Or a linter. Or code reviews. Or anything else. The nice thing is that if the compiler doesn't demand something, it can be given to the engineer as an option. The compiler should have the option to do it. The option could even be defaulted on. Afaik there is no way in Golang to disable that error (this is the line that does it: https://github.com/golang/go/blob/04fb929a5b7991ed0945d05ab8015c1721958d82/src/go/types/stmt.go#L67-L69). like --no-pedantics or such. Golang's compiler openly refuses to give engineers more choices in what they think is the best system to handle it. permalink fedilink source parent hideshow 2 child comments replies: [–] aport@programming.dev -5 points 2 years ago (1 child) Who needs an option to leave unused variables around the code base? Lazybones? permalink fedilink source parent hideshow 2 child comments replies: [–] MJBrune@beehaw.org 5 points 2 years ago You've literally never commented out a line or two but left the variable declaration while debugging? permalink fedilink source parent
[–] aport@programming.dev -5 points 2 years ago (1 child) Who needs an option to leave unused variables around the code base? Lazybones? permalink fedilink source parent hideshow 2 child comments replies: [–] MJBrune@beehaw.org 5 points 2 years ago You've literally never commented out a line or two but left the variable declaration while debugging? permalink fedilink source parent
[–] MJBrune@beehaw.org 5 points 2 years ago You've literally never commented out a line or two but left the variable declaration while debugging? permalink fedilink source parent