- cross-posted to:
- cpp@programming.dev
- technology@lemmit.online
- cross-posted to:
- cpp@programming.dev
- technology@lemmit.online
Python is memory safe? Can’t you access/address memory with C bindings?
Python is memory safe? Can’t you access/address memory with C bindings?
That’s true in C as well, though. This is what people mean when they say things like “undefined behavior can result in time travel”.
The difference is twofold:
unsafe
code are not completely formalized yet. This means that there are open questions about whether particularly complex patterns in unsafe code will be guaranteed by future versions of the compiler to be sound. Conversely, the C and C++ spec are generally sufficient to determine whether any particular piece of code has undefined behavior, even if actually analyzing it to find out is not possible automatically using existing static analysis tools.