3 ms·
Hyperbole, or do really believe every line of C is unsafe, in the literal sense, by default? Pray tell me what is the difference between // safe, tested, C
by paavoova 8y ago
Hyperbole, or do really believe every line of C is unsafe, in the literal sense, by default? Pray tell me what is the difference between
// safe, tested, C
...
// potentially dangerous C deemed thus for whatever arbitrary reason
And
// "safe" Rust
...
// "unsafe" Rust
- steveklabnik 8y agoStatic analysis.
- pjmlp 8y agoLife experience since I touched C for the first time in 1992. So yes I do belive, given the quality of the code bases I have seen in production. And as discussed at Linux Kernel Security Summit 2018, which videos are freely available for you to watch as well, even with the rigorous process to accept patchs into the kernel, CVEs keep increasing. 68% of them were caused by memory corruption, something mostly unique to C and languages that are copy-paste compatible with it. Then another good chunk was related to UB, something that even Linus already ranted a few times. So yeah, Safe C is an oxymoron, unless we are talking about a new variant with safety turned on by default, where warnings are dealt as errors and everyone uses static analysers that break their CI builds on error.