3 ms·
Not a new idea. There's plenty of prior art: - Cyclone: https://www.cs.cornell.edu/projects/cyclone/ https://www.cs.cornell.edu/projects/cyclone/ (2002) - SAL
by 29athrowaway 4y ago
Not a new idea. There's plenty of prior art:
- Cyclone: https://www.cs.cornell.edu/projects/cyclone/ https://www.cs.cornell.edu/projects/cyclone/ (2002)
- SAL: https://learn.microsoft.com/en-us/cpp/code-quality/understanding-sal?view=msvc-170 https://learn.microsoft.com/en-us/cpp/code-quality/understan...
Not to mention languages that are generally safer such as Ada.
They also fail to present a code example that looks more ergonomic than Rust.
- asveikau 4y agoHaving worked at Microsoft where SAL is used extensively, I can tell you it's entirely inadequate for actually preventing memory safety issues. At best it can give you things in the category of better warnings. At worst, you can annotate incorrectly or not at all, so it doesn't even work with correct info.
- pjmlp 4y agoWhich kind of proves the point of all these approaches not being able to be nothing more than bandaids.
- asveikau 4y agoI'm not sure it does prove it. It could just be a story of poor execution.
- 29athrowaway 4y agoBut that was not the way it was sold to developers and stakeholders.
- woodruffw 4y agoAlso from MS: Checked C[1], which aims to detect many of the same bug classes. I agree entirely about the ergonomics, and I think the authors also oversell what “safe” means for C-rusted-checked code, versus what safe means in Rust. There are some nice ideas here (and I’d like to see the implementation!), but it’s a stretch to say that something as incremental as this can provide the same program-wide guarantees that safe languages can. [1]: https://www.microsoft.com/en-us/research/project/checked-c/ https://www.microsoft.com/en-us/research/project/checked-c/
- Conscat 4y agoCyclone is not strictly backwards compatible with C.