News for hackers. Stuff that matters.
Re:Go Turns 10 by mynameishere on Friday November 08, 2019 @07:00PM (#21488315)
Lots of trivial things are errors (like unused variables)

My learning experience with Go ended when I happened upon this. Unused variables aren't even worth a warning, and yet it is absolutely impossible to get around them in Go.

Maybe it's just my style, but I like to start out code with methods and variables in rough outline, and then build it from there. If a language makes that impossible well...there are other languages. Also, I didn't want to learn what other doozies Go had in store if they made that kind of stupid nanny issue a categorical imperative.

Re:Go Turns 10 by Cthulhu_ on Monday November 11, 2019 @04:41AM (#21503348)
And that's a fine style to have - as long as they're not left behind when you commit them. Go is a bit painful in this regard, but it's targeted at maintainability by large teams over a long period of time, sacrificing local developer ergonomics in the process.

I mean I wouldn't object to it being a bit more forgiving in some instances, as long as it's as anal as can be when you commit some work and / or share it with others.

Of course, it's an open source project so in theory the unused variable check can be disabled.

Re:Go Turns 10 by icholy on Friday November 08, 2019 @08:03PM (#21488728)
Fast forward to someone maintaining your code full of empty method stubs and unused variables because "that's my style".
Re:Go Turns 10 by todotask on Saturday November 09, 2019 @06:35AM (#21490915)
Housekeeping and maintainability are important.
Re:Go Turns 10 by sullyj3 on Monday November 11, 2019 @11:15AM (#21505982)
can't you just comment them out?
Re:Go Turns 10 by sethammons on Friday November 08, 2019 @07:50PM (#21488643)
_ = myUnusedVar

Done.