4 ms·
> Again someone blaming the victim. I'm kind of sick of this. C and C++ blame the victim - as do, in practice, compilers for them - by labeling what they've do
by MaulingMonkey 10y ago
> Again someone blaming the victim. I'm kind of sick of this.
C and C++ blame the victim - as do, in practice, compilers for them - by labeling what they've done "undefined behavior" and telling you to do better. I'm kind of sick of C and C++ too. Plenty better than I have attempted to argue the case for optimizers to hold back and behave saner, to stop their abuse. They have failed. I've done plenty of arguing against choosing C or C++ for projects that do not need it. I have failed. I can educate on undefined behavior, that victims may attempt to avoid and combat their abuse. Maybe someday they will break the cycle, and I will have had a hand in enabling them.
While perhaps ogoffart does not perfectly outline that maybe the language is at fault for some UB, ogoffart's links make the case. TIL about yet another source of undefined behavior:
>>> An unmatched ‘ or ” character is encountered on a logical source line during tokenization.
>> With all due respect to the C standard committee, this is just lazy.
My understanding is that this:
int main() { return !"
Could launch NetHack. Disgusting.
- glandium 10y ago> by labeling what they've done "undefined behavior" and telling you to do better. If only they did that. But no, they instead label what they've done "undefined behavior", and silently perform optimizations that may or may not break their program entirely. Double emphasis on silently.