3 ms·
Just use an editor with language server support and you don't need to worry about adding or removing the `_ = unused; // autofix`. I wrote a 16kloc Zig project
by flohofwoe 2y ago
Just use an editor with language server support and you don't need to worry about adding or removing the `_ = unused; // autofix`.
I wrote a 16kloc Zig project a couple of months ago, and not once the 'unused variables are errors' thing was annoying (https://floooh.github.io/2024/08/24/zig-and-emulators.html https://floooh.github.io/2024/08/24/zig-and-emulators.html)
IME unused variables being (linter) errors also isn't all that unusual in the Javascript/Typescript world. It feels 'normal' fairly quickly.
- alpaca128 2y agoOr the compiler could just add a flag and not make assumptions about my setup or workflow. Also linters are optional and under my control. Meanwhile the Zig compiler is forcing that onto me, and for what benefit exactly? > I wrote a 16kloc Zig project a couple of months ago, and not once the 'unused variables are errors' thing was annoying That's great, but different people are different. I've tried learning Zig twice by now but this is just a dealbreaker, simple as that.
- kaimac 2y ago"just"