3 ms·
In some ways, Rust fits that sort of ultra-tiny niche even better than C++. It doesn't have the POD/non-POD split that C++ has, it has a lot of built-in data la
by Rusky 9y ago
In some ways, Rust fits that sort of ultra-tiny niche even better than C++. It doesn't have the POD/non-POD split that C++ has, it has a lot of built-in data layout optimizations, idiomatic code does far less copying, you can package up platform hardware definitions in crates, etc.
Of course C++ can just revert to being mostly C in these cases, and C is lightyears ahead in tooling and documentation here, but as a language I think Rust has a decent shot at that space.
- AstralStorm 9y agoI don't think so, just because modern C++ can coopt almost all Rust features with trivial style and tooling changes. One of the benefits of being a truly actively developed language, as opposed to fossilized Java.
- pjmlp 9y agoJava is only fossilized on Google's Android fork. Who knows, maybe it even gets value types before the C++ community can agree what modules are supposed to be.
- steveklabnik 9y agoC++'s Core Guidelines have been worked on for the last two years, and weren't even trying to get full compatibility with Rust's guarantees, and still aren't really done yet. It's great work, but it's far from "trivial". If it were trivial to turn C++ into Rust, we wouldn't have bothered making Rust.
- Rusky 9y agoThat's... not true at all. Even aside from the memory safety stuff steveklabnik mentioned in a sibling comment, C++ is struggling to get things like concepts, pattern matching, or modules, and had to do a lot of non-trivial work in the past to get things like move semantics. And even then none of that solves the problems I mentioned in the comment you replied to.