News for hackers. Stuff that matters.
Re:Game Jam 2 Results by alpaca128 on Friday September 09, 2022 @08:22PM (#32786450)
> you can assign it away via: _ = somevar

If one suggested this in any other language to suppress "unused variable" warnings it would be considered a lazy way to avoid fixing the issue.

Meanwhile the developer of Zig himself recommended doing this[0] which only shows what a bad idea it is to make this a compiler error imho. It encourages workarounds and enforces something we automated long ago in the form of dead code elimination.

[0] https://github.com/ziglang/zig/issues/335#issuecomment-43526...

Re:Game Jam 2 Results by hactually on Monday September 12, 2022 @01:53AM (#32806549)
It's how Go works...