6 comments

[ 5.2 ms ] story [ 26.5 ms ] thread
(comment deleted)
Yet more proof, if any was needed, that C++ is a lost cause and never should've existed. Undefined behavior in C is bad enough, but apparently the C++ people decided to take it to the next level.

In the old days, C(++) had a pretty clean correspondence to assembly, and you could picture the generated assembly in your head as you went, while(1); would map pretty easily to

loop: jmp loop

What is the genesis of this? Did someone discover this using a fuzzer? Or is this a minimal test case of a real-world program that someone was pulling their hair out over for a while.
If you grep the entire c++ draft from https://eel.is/c++draft/ with the word 'undefined', it will return '1087', as it was generated on 2024-02-28 from the LaTeX sources...not 1 or 2, but 1087 freaking times!!!

I used to be obsessed with C++, started back in 2002, but after many attempts to learn it, let alone to master it, I have decided to direct my attention elsewhere as it's not worth it anymore :(

When they fix it and trim it down to a slimmer version, they can let me know.

This just in - cherry-picked shitty C++ code behaves shittly. Who cares?
Someone compiling C code (where this is defined and NOT UB) with a C++ compiler (where is IS UB). I think using a C++ compiler on C code is a mistake, but not everyone shares my opinion.