4 ms·
Unused variables stops all further compilation, so that even future errors can't be seen until the variable is used.
by 90s_dev 1y ago
Unused variables stops all further compilation, so that even future errors can't be seen until the variable is used.
- Mond_ 1y agoMeh. I think this should be a warning on debug builds and an error on release builds, but it's a relatively minor thing and not a deal breaker by any means. If this is the worst thing that people would like to see revisited, Zig must be doing amazingly well.
- josephg 1y ago> but it's a relatively minor thing and not a deal breaker by any means. It totally breaks my normal workflow. I don’t use zig at all because of this misfeature. Warn in debug and error on release builds would be strange but fine.
- deleted 1y ago[deleted]
- mlugg 1y agoThis is simply not true. See https://zigbin.io/f57b94/run https://zigbin.io/f57b94/run. (That link seems to show the "unused local variable" error line twice for me; that's some kind of bug with this zigbin service and does not reproduce when running the Zig compiler normally.)