News for hackers. Stuff that matters.
Re:Zig: Build System Reworked by galangalalgol on Saturday May 30, 2026 @09:21AM (#48335875)
What do you like to ise those features for?
Re:Zig: Build System Reworked by xyzsparetimexyz on Saturday May 30, 2026 @09:26AM (#48335931)
In rust, having unused variables as a warning (but not an error) let's you refactor code, test it and see what is now unused as a result. You can then remove the unused items. Zig requires you to remove the unused items (e.g. with '_ = ...;' which is then something you might forget about) before testing, increasing friction.

Multiline comments are less important, but its still convenient for commenting out large chunks of code. IDEs make this a bit easier when you can press e.g. Ctrl+/ to comment out the selected lines with //, but it doesn't work in all cases.

The friction stops zig from being fun imo. A shame because I really like comptime.

Re:Zig: Build System Reworked by galangalalgol on Saturday May 30, 2026 @09:39AM (#48336054)
Thanks, there is always a risk of people jumping on replies like that to scream that you are doing it wrong. I just wanted to see how other people do stuff. Hope everyone stays nice.
Re:Zig: Build System Reworked by Weebs on Saturday May 30, 2026 @09:29AM (#48335963)
Not the person you replied to but I leave unused variables as future TODOs. It's a warning in F#. I also often use them for inspecting data in the debugger