By any measurable criteria, Rust is better than C++. Julia is better than C++ even by some non-measurable ones. D was designed to be better than C++ to begin with, and its very existence, all the 18 years of it, shows that it is.
However, we don’t see flocks of C++ programmers migrating to the next new thing whatever this thing is. It’s simpler! Ok. It’s safer! Whatever. It’s more expressive! If you say so.
Are all these people unreasonable? Are they just stubborn? Do they hate progress?
I don’t think so. I think, staying with the slightly inferior thing has its perfect rationale. To make it transparent, I propose an exercise in imagination. Imagine Alice and Bob talking about motorcycles.
Alice rides a 16 years old Honda Hornet. It’s a well-maintained bike in reasonably good condition. She is happy with it, it gets her from A to B perfectly fine.
Bob recently bought a mint 2020 Yamaha MT-7 and is even happier.
“Alice!” says Bob. “You have to buy one of these! It’s superb! It’s better than yours in every aspect! Look at it! Just look! Isn’t it a beauty?”
“Yes,” responds Alice. “It is a nice bike. It’s new and shiny. But I’m perfectly fine with my Hornet.”
“But yours is so old it has carburetor in it. Life is much easier with the injector. No more cold starts, no more choke levers, you just press the button and go.”
“Frankly, it has never been a problem for me. Yes, it seems a bit troublesome at first, but as soon as you learn to feel your engine, the cold start is just a slight delay. I can live with that.”
“Mine has ABS as standard. It’s for safety, don’t you want safety?”
“Um. There are different opinions on ABS for motorcycles but I am with you on this one. I had ABS installed nine years ago.”
“Mine is lighter, has more power, and it’s easier to ride.”
“First of all, it’s only a few kilos lighter. So technically yes, but the difference is so small it’s irrelevant. Second, yours have more torque but mine has more horsepower so the power argument is questionable. Third, I’ve been riding my Hornet for sixteen years, and for me, it is pretty easy to ride as it is.”
“Ok, I have one more argument. Mine is new. It has a new engine, new breaks, new suspension. Don’t you think that a new bike in the same category would perform better than an old one?”
“It might be. It’s also eight thousand euros. Look, you told me I should buy a new bike because it’s better. I could agree that it is. I couldn’t agree that I should. Paying the full price for a marginally better machine doesn’t seem like a good deal to me. If I ever get bored with my Hornet, I’d rather buy Africa Twin and go on an adventure.”
As you might imagine, the cost of a new language training for a highly paid professional is way higher than a price tag on a street bike. And the benefit is yet marginal. Would you get a better offer as a Rust newbie than a C++ professional? Probably not. Would you be more productive? Again, maybe not at first. Would you be less frustrated generally? Maybe, maybe not.
It’s totally explainable why people with C++ background are not enthusiastic about the new languages. Besides, the new languages are not that exciting by design.
Binary to assembly transition was exciting. It was game-changing. Assembly to Fortran was probably too. Prolog, although didn’t get the success it deserves, was completely different from all the other languages in its day so yes, I can see where would my money go. Smalltalk. Lisp. Forth. In its own time, all of them could have taken you on an adventure.
C++ to Rust? It’s more like a commute.
But what about those who don’t have to go through the transition? What about people with little to none experience neither with C++ nor with Rust?
Should a newbie ride a hundred horsepower beast with no ABS?
I think, for someone new to programming, Rust is well worth its learning effort. And Julia. And D. Even put together they still probably take less effort to learn than C++ with all its quirks and pitfalls. And you get to enjoy the new suspension.
P. S. I am still undecided on whether it’s ethical to encourage new people into C++. If you want to help me decide, please vote: https://twitter.com/wordsandbuttons/status/1299666634265763842