2 ms·
When issues like this come up, I think the right outcome is to support the popular choice as the default, and support the unpopular choice, but with a penalty.
by insulanus 8y ago
When issues like this come up, I think the right outcome is to support the popular choice as the default, and support the unpopular choice, but with a penalty.
For example, forcing extra code to be inserted, that is, a check (or even a call out to a library), so one unified semantic is followed, and there is no undefined behaviour. Of course, you wouldn't mandate how the semantics are followed.
The problem is, it was very hard for us to accept this kind of solution when we grew up feeling like every cycle counted, so that's what I blame for a lot of the UB we see today in the standard.