(no title)
NyxWulf | 3 years ago
That eliminates the unused chain problem. Not sure if zig included that part of the feature as well.
Generally I agree though. The main problem with forcing unused variables, imo, is that it forces you to think a certain way. When I'm exploring the solution space on something, those constraints feel inhibiting.
alpaca128|3 years ago
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...
hactually|3 years ago