>>106391460
Yeah pretty much. Of course I don't mind that some people like it, and of course for "production" builds it's a very good error to have. I just think it's dumb to completely forbid people from doing prototyping/hacking code this way.
I currently write Rust at work and there are regular instances where I'll disbale unused import or unused variable or dead code checks, while either prototyping out an initial implementation of a feature where I'm switching stuff out and maybe not sure of exactly what imports I'll need, or debugging and shoving print-outs and debug checks in various places. Sometimes I want a thread or function to quit instantly on a debug condition and I know the rest of the code is dead code and I don't need the compiler to fail the build over this.
Even the shadow variable disallowing is fine IMO, it's just a different style choice and has valid correctness benefits. Disallowing disabling checks for prototyping/debugging has zero correctness benefits whatsoever, which is what annoys me the most.
>Thankfully we have tons of languages to choose from.
It's not that many - for example, there's no (well-supported) language that has all of Zig's good features but without the mandatory unused stuff checks. Hence why I think it matters. A lot of what Zig does is actually quite cool.