3 ms·
C++ is an unsafe language in all of its current implementations except CHERI. Stroustrup is being tone deaf or maybe he just doesn’t get it. The issue is that
by pizlonator 3y ago
C++ is an unsafe language in all of its current implementations except CHERI.
Stroustrup is being tone deaf or maybe he just doesn’t get it.
The issue is that there are so many ways in which you could write a C++ expression that violates memory safety and gives users control of your heap.
In Java or other truly safe languages, there are zero ways to do that short of pwning the JVM with a bug. In Rust and other safe systems languages, to do something unsafe you have to call it out using the unsafe keyword.
So - the places in your C++ code where you might have a memory safety violation are everywhere while in the alternatives they are either nowhere or they are carefully demarcated.