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.
Yes, 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.
Making 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.
Panzerschrek · · focus · HN ↗
That's why having no auto-destructors is a dead-end. This is the greatest mistake of such languages like Zig or Odin.
dnautics · · focus · HN ↗
Panzerschrek · · focus · HN ↗
dnautics · · focus · HN ↗
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 · · focus · HN ↗
dnautics · · focus · HN ↗