4 ms·
C and C++ are not the same case. Modern C++ supports fairly strict and exhaustive type safety that can robustly evaluate many types of safety at compile-time, i
by jandrewrogers 6y ago
C and C++ are not the same case. Modern C++ supports fairly strict and exhaustive type safety that can robustly evaluate many types of safety at compile-time, if you choose to use it to its full capability. C doesn't even have these facilities.
Anecdotally, I haven't seen an open source C++ code base that is uses type safety to that extent but it is certainly possible.
- SAI_Peregrinus 6y agoC++'s problem is that it still silently supports non-Modern style code, so the safety is opt-in. And you have to check everywhere for it. It's not as bad as C where the safety just doesn't exist, but it's not much better. As you noticed yourself, it's not actually used safely!