Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> 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.)



> 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!)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: