Comment by fooker

9 months ago

A C++ replacement must have really strong and seamless C++ interop to be considered by anyone currently using C++. You can't have a C++ replacement by ignoring existing C++ users and libraries, no matter how good the the language is.

Swift from Apple and Carbon from Google are stronger contenders at this point.

No language from Apple / Google / Microsoft / whatever can ever be a serious replacement for C++. When the development of the language is dominated by a single entity, the risk that the interests of that entity override those of other users is simply too high.

Vendor-specific languages are fine, if you are developing something for that vendor's ecosystem. But if you don't want to lock your code to a specific ecosystem, an independent language such as C++ or Rust is a better choice.

  • C++ is only independent on the surface, as all the big players seat at WG21, and it goes where their votes say it goes, plus what actually gets implemented into compilers (none of them is 100% ISO compliant, each one has minor compliance issues).

    Same applies to C, stuff like C23 is decided by who gets to join WG14.

    In both cases, someone has to buy the final standard from ISO.

  • I don't disagree.

    Pragmatic considerations tend to win over ideological ones though.

    Consider Java's success.

    • I was thinking more about pragmatic issues, and Java is a good example of them. It's a widely used language, but it's also a huge failure.

      25 years ago, Java was supposed to be the new general-purpose language you could use for everything. Universities rushed to teach it to everyone. There was a lot of initial success, but then Java started losing ground. The direction the language was going was not good for many applications. And then lawyers got involved, which didn't help.

      C++ is a general-purpose language. It's widely used, because it's widely used. The language is good enough for many tasks, and you can probably find the libraries you need and people familiar with the language. If you work in a niche with no specific reasons to use a particular language, C++ is often a good choice.

      Rust is not there yet, because it's a new language with limited library support. But it does have momentum. The biggest threat to Rust as a general-purpose language is probably async. When there are strong interests to develop the language and the ecosystem for specific applications, other niches often suffer.

      1 reply →