3 ms·
But with static analysis it's still possible to miss some leaks or to have false-positives. That's why an integrated language mechanism preventing such leaks is
by Panzerschrek 14d ago
But with static analysis it's still possible to miss some leaks or to have false-positives. That's why an integrated language mechanism preventing such leaks is much better.
- dnautics 13d agoYes, so you pick "false positives" instead of "missing some leaks" and you build a way to mark code as "unsafe". This is not fucking rocket science > That's why an integrated language mechanism preventing such leaks is much better. No categorical difference, except one is opt-in. You can even design your static analyzer so it analyses the code of dependencies that haven't opted in.
- estebank 13d agoMaking things opt-in means that it will happen less often, making them opt-out that they will happen more often. In this case, on the one hand you have destructors that don't run when they should, and on the other you have destructors running at a more granular level than you'd want sometimes. I know which human failure mode I prefer.
- dnautics 13d agoIn practice as long as you stick to using zig std, an analyzer can get quite far