|
|
|
|
|
by gavinhoward
412 days ago
|
|
I am one of the "stop exploiting UB" camp. [1] I agree that some of us are unreasonable, but I do recognize that DWIM is not feasible. I just want compilers to treat UB the same as unspecified behavior, which cannot be assumed away. [1]: https://gavinhoward.com/2023/08/the-scourge-of-00ub/ |
|
Rust's safe subset doesn't have any UB, but the unsafe Rust can of course cause UB very easily, because the rules in Rust are extremely strict and only the safe Rust gets to have the compiler ensure it doesn't break the rules. So it seems weird for people who work on the compiler guts to be "surprised".