▲ | Conscat 7 months ago | |||||||||||||||||||||||||||||||
Carbon isn't currently memory safe, but Chandler Carruth has made it clear that every security expert he talked to says the same thing: memory safety is a requirement for security. He at least claims that Carbon will have memory safety features such as borrow checking down the line. I guess we'll see. | ||||||||||||||||||||||||||||||||
▲ | vlovich123 7 months ago | parent [-] | |||||||||||||||||||||||||||||||
It’s worrying to me that Carbon separates data races and memory safety as two distinct things when data races can easily cause both spatial and temporal memory safety issues. Similarly, type safety, can also cause spatial issues (e.g. many kernel exploits in Darwin were a result of causing type confusion for the SLAB allocator resulting in an exploitable memory safety issue). The entire philosophy errs too much in the direction of “being reasonable” and “pragmatic” while getting fundamental things wrong. > Over time, safety should evolve using a hybrid compile-time and runtime safety approach to eventually provide a similar level of safety to a language that puts more emphasis on guaranteed safety, such as Rust. However, while Carbon may encourage developers to modify code in support of more efficient safety checks, it will remain important to improve the safety of code for developers who cannot invest into safety-specific code modifications. That’s really just paying lip service to Rust without recognizing that the key insight is that optional memory safety isn’t memory safety. It is kind of neat just how much Rust has managed to disrupt the C++ ecosystem and dislodge its position. | ||||||||||||||||||||||||||||||||
|