Conversation

Replying to
i can think of … Jonathan Blow's language (which doesn't seem of sufficient importance to bother remembering the name), and … Nim?
6
10
C and C++ can't be made memory safe with sanitizers. ASan only reliably detects linear overflows, not an arbitrary read/write from one object into another. A production implementation of even inter-object bounds safety for C is unavailable let alone temporal safety support.
1
3
It would be really cool if Clang had a switch to enforce memory safety but doing it efficiently and accurately likely requires having 128-bit or larger pointers which means having a different ABI. It could probably be done with ~30% performance overhead + fat ptr memory overhead.
3
2
You can use mostly-precise GC for C if you use a very strict interpretation of the standard with the same rules for pointer provenance, etc. Clang/GCC use to optimize for enforcing a safe memory model instead. It's entirely possible to implement standard C that way on top of JVM.
1
4
Every new ABI is an opportunity to provide inter-object bounds/temporal safety at relatively low (< 25%) cost. It probably would have severely hindered WebAssembly adoption but it was still an explicit choice. Same goes for every new architecture choosing to keep being unsafe.
4