Like I said, it doesn’t need to appeal to everyone to succeed, just a critical mass. Binding Rust to C++ isn’t easy, but the value proposition is strong enough that Firefox and Chromium (early days) projects use Rust in their massive C++ codebases.
But who knows how well a language that prioritises interop with C++ will fare? I guess we’ll find out Carbon 1.0 shows up in 2025. Similarly Zig with its fantastic C interop.
I’m defining mainstream language as one that will continue to be actively developed 10 years from now, will have a thriving ecosystem of libraries and will be easy to hire developers for. If you have these three, you can start a new code base in that language today without worrying that you’ll be left with legacy software in a few years that’ll need to be rewritten.
This definition of mainstream is more useful than “almost all devs know the language”, which is something that only applies to Python and JavaScript anyway.
By this definition, you probably don’t want to start a new codebase in COBOL, Perl, Objective-C or other languages that are trending downwards in usage. But you can use languages that have reached that critical mass like Rust and Go, even if every single developer might not know them.
I’m basing what I say on what languages developers said they knew in the 2023 StackOverflow survey (https://survey.stackoverflow.co/2023/#technology-most-popula...). You definitely would call Java and C# mainstream, and they’re used by 31% and 28% of developers respectively. Go and Rust are used by 13% of devs. Not in the same league, but they’ve both reached critical mass so they won’t disappear.
But who knows how well a language that prioritises interop with C++ will fare? I guess we’ll find out Carbon 1.0 shows up in 2025. Similarly Zig with its fantastic C interop.