3 ms·
I've been reading through the proposed C23 spec. Looking at what's happening with enums, it's amazing how suddenly a simple feature became a far more complicate
by WalterBright 4y ago
I've been reading through the proposed C23 spec. Looking at what's happening with enums, it's amazing how suddenly a simple feature became a far more complicated one. I read the spec on enums over and over, and still don't understand it.
They're just enums, geez.
- Animats 4y ago> I read the spec on enums over and over, and still don't understand it. That's from someone who has written C++ compilers. Some of the insane complexity being added to C++ comes from trying to emulate Rust move semantics without a borrow checker. An xvalue is what's left behind after you do a move. In Rust, the compiler guarantees that you can never access the remnants after a move. But in C++, someone will somehow manage to leak a raw pointer to something, then move it. So users have to know about xvalues. (Could be worse. Trying to emulate Javascript async semantics in everything else has resulted in some real horrors. Only Go has a sane solution.)
- adrianmsmith 4y ago> Only Go has a sane solution. And Java Project Loom IMHO, which copies a lot of Go's sane solution. (Not released in an LTS version of Java yet, but hopefully soon!)