4 ms·
Late to the party, but: this unfortunately doesn't seem to be true. There's no subset of C++ (or C for that matter) which is both safe and practical to use. Thi
by MaxBarraclough 3y ago
Late to the party, but: this unfortunately doesn't seem to be true. There's no subset of C++ (or C for that matter) which is both safe and practical to use. This is why, say, the Chromium folks are seriously looking at adopting Rust. Same goes for the Linux kernel and their adoption of Rust, although of course that's a C codebase.
To rework an old comment of mine: [0]
There is no subset of C++ which is both safe and practical for real use. The MISRA C++ subset isn't enough to provide solid assurance of the absence of undefined behaviour, for instance. For that, you need a full-bore formal verification system, akin to that of the SPARK Ada language.
This is in sharp contrast to Rust, where there really is a subset which is safe 'by construction' (called Safe Rust).
[0] https://news.ycombinator.com/item?id=27605144 https://news.ycombinator.com/item?id=27605144