2 ms·
You should also consider that optimizing for incorrectness and prototyping speed might not be the professionally responsible choice in 2022.
by refulgentis 4y ago
You should also consider that optimizing for incorrectness and prototyping speed might not be the professionally responsible choice in 2022.
- alpaca128 4y agoUnused variables don't make a program incorrect. When you comment out unused variables to prevent Zig's compiler error you don't remove the dead code, you in fact make it more likely to stay in the codebase because now it's only visible to humans. While almost every other language will print out a clearly visible warning without disrupting the workflow. I can only see downsides and no upside in this design. Why would you slow down the development workflow for something any decent compiler will discard as basic optimization step? It's an error about something that has absolutely no impact on the resulting program and its execution, you can probably find a dozen better reasons for Zig to throw errors where it doesn't.
- TakeBlaster16 4y ago"Optimizing for incorrectness" is a funny way to describe the practice of enforcing lint checks as part of a CI pipeline.
- refulgentis 4y agoYou're right, the provocation here is engaging in intentionally choosing a language, and choosing Zig, is optimizing for incorrectness. I didn't mean the flag.
- suby 4y agoI also misinterpreted the comment. Either way, I don't see the harm in optimizing for prototyping speed. It's orthogonal to the safety issues.