News for hackers. Stuff that matters.
Re:The Value of Undefined Behavior by ben-schaaf on Sunday July 22, 2018 @01:31AM (#17585409)
Instead of defining what happens in the situation, most languages opt for making this type of error impossible in the first place. Languages with a GC do this by never freeing if a reference still exists. Rust (safe) does this by enforcing lifetimes at compile time.
Re:The Value of Undefined Behavior by millstone on Sunday July 22, 2018 @03:20AM (#17585647)
These languages aren't capable of expressing the software that's routinely written in C (inc C++). For example, there's no way to enforce the lifetimes of NaN-boxed pointers managed by the multithreaded GC in the custom heap of your browser's JS engine.

There's certain classes of C's UB that can be addressed, but most of it can never be without neutering C to the point of uselessness.