4 ms·
> the damage is more severe than it would be if it simply crashed. I think I see your point, but you are wrong when you write "simply". Crashing in case of UB
by pif 10y ago
> the damage is more severe than it would be if it simply crashed.
I think I see your point, but you are wrong when you write "simply". Crashing in case of UB is not simple! Actually, ensuring any type of behavior in case of UB is not simple! It requires huge lots of runtime checks, thus you obtain a ridden executable as output. If you want your program to be cuddled in a safe baby box (which is the right thing to want in several cases), then go for an interpreted language, but please let "gcc -O3 -march=..." be what it is: a masterwork coated with magic.
- wvenable 10y agoIn the vast majority of cases, concept of Undefined Behavior shouldn't even exist. All behavior should be defined. We have massively powerful machines and the performance advantage mostly doesn't outweigh the potential damage. And other languages, like Rust, even eliminate lot of UB without a lot of overhead. There are exceptions to every rule, of course, but we need to re-evaluate our priorities as times change.