back

by raphlinus·3y ago·view on hn ↗
I'll explain the joke, as it's subtle. Rust indeed has an explicitly stated backwards compatibility guarantee, which limits evolution of the language. One example of that is Range not being Copy because of some decisions taken early on; most people would agree that this was a mistake. There is an "edition" mechanism that allows some evolution, for example adding new keywords, but it can't solve everything.

C++, by contrast, has a tradition of maintaining backwards compatibility, but it is not enforced systematically, and in practice migrating to newer versions of C++ can be a painful process. Thus, in many application domains (especially embedded), developers are stuck on very old versions of the language. There's also a very sticky issue of whether binary (ABI) compatibility is guaranteed. There's nothing in the standards process that guarantees this, but there has been huge resistance to proposed improvements that break ABI. This was a particular sticking point for Google[1], as it affects unique_ptr, making it not so much the zero cost abstraction as originally hoped.

Language evolution is a difficult problem, and there is no magic, obviously correct answer to it. But I think Rust has a good, pragmatic approach, and the flaws such as Range are a very small part of the overall language surface area.

Modules are a particularly disruptive to the ecosystem. It's taking a long time to get them properly implemented in C++, and it also requires fairly major changes to code bases, build systems, and other infrastructure to migrate to them. By contrast, Rust has had a decent module system since 1.0 (with various tweaks and changes through the edition mechanism).

Edit: and as 'wongarsu says in a sibling comment, another part of the joke is that Rust doesn't need as much evolution as C++, as it already has a lot of the advantages such as a working module system.

[1]: https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2020/p20...