NO! Your code WILL NOT compile if it has an unused variable!

>NO! Your code WILL NOT compile if it has an unused variable!
>no, I can't "just give you a warning." You HAVE to remove the unused variable IMMEDIATELY or it WON'T COMPILE!!!

Attached: 1611963866478s.jpg (250x250, 18.26K)

name one

What's the problem with this?

Assuming it's really unused and not some maybe-unused

I'd like to explain but you wouldn't get it.

Then just remove it or comment ir out why are you so mad

java sirs cant stop winning!

>unused
but it is used :^)

It's actually good because it makes the parser easier to write.

Literally no reason for this behavior to exist. If the Go compiler is really that autistic then it should just optimize the unused variable out and give a warning after compilation like every other optimizing compiler.
That's just incredibly tedious to do every single time you make a change that may make a variable temporarily go unused. Then again Go and being incredibly tedious is like bread and butter, so I suppose it's fitting.

nigger := “nigger”
_ = nigger

Wow, that’s so difficult. Bet you’re going to complain about generics next, right?

And that's a good thing. The go compiler never gives a warning because warnings are accumulate and get ignored.

so comment out the line where you declared it

var a = 1;
_ = a;

It's a waste of time during development and doesn't guarantee any better behavior. For a production build, sure, it might help you catch a problem. For development, it's just a nuisance that can end up causing more problems than it fixes due to requiring workarounds.
>just do extra unnecessary work that could potentially lead to even more uncaught mistakes

Attached: gotard.png (362x521, 44.88K)

>_ = nigger
You shouldn't have to retardedly trick the compiler into thinking that the variable is being used. At the very least there should be some sort of flag that allows you to compile with unused variable for testing purposes.
>warnings accumulate and get ignored
That's not the compiler's job to care about.

>retardedly trick the compiler
user, even the language’s creator said it was designed so the diversity hires Jewgle brings over from Pajeetistan can still be somewhat productive. Are you seriously getting filtered by this?

>The go compiler never gives a warning because warnings are accumulate and get ignored.
Well the only alternative to warnings being accumulated is the accumulation of pointless shitfuck code like intentionally designed to circumvent the compiler, which is way worse than warnings because shitfuck code can't be found and fixed nearly as easily.

>complaints mean you're...LE FILTERED

Attached: yotsoiba.jpg (811x1049, 289.07K)

Beauty of go is that you can remove the rule. Go is easy to compile and edit. Took me 20 or 30min to clone Go and get rid of this

(void)somevar;

hmm today i will introduce a non-standard compiler into the team project

Maybe just remove the unused variable then. If you're not using it anymore, why is it in the codebase?

unused(var)
not my fault your dumb non gcc compiler doesn't understand if statements