Re:Game Jam 2 Results
by refulgentis on Friday September 09, 2022 @12:54PM
(#32781743)
You should also consider that optimizing for incorrectness and prototyping speed might not be the professionally responsible choice in 2022.
[ Parent
| on HN ]
Unused 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.
Re:Game Jam 2 Results
by TakeBlaster16 on Friday September 09, 2022 @02:17PM
(#32782946)
"Optimizing for incorrectness" is a funny way to describe the practice of enforcing lint checks as part of a CI pipeline.
Re:Game Jam 2 Results
by refulgentis on Friday September 09, 2022 @02:21PM
(#32782991)
You'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.