News for hackers. Stuff that matters.
Re:Zig: Build System Reworked by latexr on Saturday May 30, 2026 @02:27PM (#48339265)
> It doesnt let you have unused variables

Andrew Kelly on that:

https://www.youtube.com/watch?v=iqddnwKF8HQ&t=2927s

Looks like you might be able to get rid of the error easily with annotations.

Re:Zig: Build System Reworked by xyzsparetimexyz on Saturday May 30, 2026 @03:04PM (#48339592)
So your ice turns 'let unused = func();' into 'let _ = func();' automatically? Okay but then do I later have to grep for 'let _' to find all these unused variables and delete them? This is silly and a has consequence of zig not having any system for warnings
Re:Zig: Build System Reworked by cdud3 on Sunday May 31, 2026 @02:24AM (#48343469)
Why not ignore unused variables in debug and warn in release mode?
Re:Zig: Build System Reworked by xyzsparetimexyz on Sunday May 31, 2026 @04:16AM (#48343942)
Warning everywhere makes sense. BMG zig doesn't have warnings at all. Just errors
Re:Zig: Build System Reworked by MrBuddyCasino on Sunday May 31, 2026 @01:46AM (#48343338)
Very nice interview. The clarity with which Andrew Kelly speaks is refreshing.
Re:Zig: Build System Reworked by yarn_ on Sunday May 31, 2026 @09:23AM (#48345496)
as a fan of him this rationale did not make a shred of sense

"Both parties can have their preference" - this was already true of C where you can just turn enable unused variable warnings or turn them into hard errors, this has nothing to do with the decision.

I also don't want my lsp randomly rewriting my code (???)