|
|
|
|
|
by returningfory2
76 days ago
|
|
Agreed that this is why a lot of people support the current UB situation, but the history of UB makes this feel wrong: > As far as I can tell, C89 did not use performance as a justification for any of its undefined behaviors. They were non-portabilities, like signed overflow and null pointer dereferences, or they were outright bugs, like use-after-free. But now experts like Chris Lattner and Hans Boehm point to optimization potential, not portability, as justification for undefined behaviors. I conclude that the rationales really have shifted from the mid-1980s to today: an idea that meant to capture non-portability has been preserved for performance, trumping concerns like correctness and debuggability. https://research.swtch.com/ub |
|