News for hackers. Stuff that matters.
Re:Should you learn C to “learn how the computer works”? by steveklabnik on Tuesday October 02, 2018 @04:46PM (#18125552)
You are right that there's no inherent need for UB. However, we made the choice to have it.

The reason to have it is the exact same reason that the distinction between "implementation defined" and "undefined" exists in the first place: UB allows compilers to assume that it will never happen, and optimized based on it. That is a useful property, but it's a tradeoff, of course.

There are no comments on this comment yet.