3 ms·
> It doesnt let you have unused variables Andrew Kelly on that: https://www.youtube.com/watch?v=iqddnwKF8HQ&t=2927s https://www.youtube.com/watch?v=iqddnwKF8H
by latexr 5mo ago
> It doesnt let you have unused variables
Andrew Kelly on that:
https://www.youtube.com/watch?v=iqddnwKF8HQ&t=2927s https://www.youtube.com/watch?v=iqddnwKF8HQ&t=2927s
Looks like you might be able to get rid of the error easily with annotations.
- xyzsparetimexyz 5mo agoSo 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
- cdud3 5mo agoWhy not ignore unused variables in debug and warn in release mode?
- xyzsparetimexyz 5mo agoWarning everywhere makes sense. BMG zig doesn't have warnings at all. Just errors
- MrBuddyCasino 5mo agoVery nice interview. The clarity with which Andrew Kelly speaks is refreshing.
- yarn_ 5mo agoas 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 (???)