News for hackers. Stuff that matters.
Re:Carbon Language: An experimental successor to C++ by IshKebab on Tuesday July 19, 2022 @12:49PM (#32154465)
cxx is great but it isn't anything close to what cogman10 is describing.

It actually can't ever be, because C++ has move constructors and Rust deliberately doesn't, so you can't for example return `std::string` from a Rust function by value.

Re:Carbon Language: An experimental successor to C++ by hlopko on Tuesday July 19, 2022 @04:39PM (#32157643)
It's currently unclear if Rust can interop with C++ with high fidelity. For example https://docs.rs/moveit/latest/moveit/ and https://github.com/google/crubit/blob/main/rs_bindings_from_... provide functionality to use non-trivially relocatable C++ types from Rust.
Re:Carbon Language: An experimental successor to C++ by IshKebab on Wednesday July 20, 2022 @07:42AM (#32164298)
Bit hard to follow but as far as I can tell those are pinning the C++ types and wrapping them in some other object that allows a move constructor to be called on them to move them to some other pinned location.

It still doesn't let you natively move them, and if you have to wrap them in something you may as well just wrap them in `Box<>` and not move them, which is what cxx does.

I guess maybe it makes a difference for passing things into existing C++ interfaces?

Anyway it looks insanely complicated.