Fascinating how defensive C++ lifers can be. Rust builds on the knowledge of decades of C++ programming. It’s basically a compiler enforced set of C++ best practices. It’s strange how hostile some in the C++ community are to Rust.
I could be wrong, but I think there's few big camps of people.
The camp that thinks Rust is just unnecessary fuss because "you can do it all" in C++ already. They pride themselves with knowing C++ esoterica, and don't like that Rust lowers the entry barrier to writing similar software. They want an exclusive club. They also see ownership as a nuisance. They know you can be equally reckless in Rust too, but they don't like that Rust is so "in your face" about it, too.
The camp that is afraid Rust will marginalise C++ and hence push them towards undesirable (even if high paying) jobs.
There's the camp that's jaded by seeing too many fads come and go, and probably just burnt out at some point. So, they just want to work with what's there and be left alone. They don't want to learn something that they know (incorrectly or not isn't for me to judge here) will be dead in the water soon. And they'll have wasted their energy on it for naught. Or in short, they see it as an unwelcome distraction. This camp also includes "but it has no ISO specification for aviation/etc" too.
I think all these are wrong.
I don't think C++ will be marginalised, it just won't be the default choice for certain domains.
I don't think the extra tooling is a nuisance, if anything in my experience it unburdens the mind from non-domain concerns.
And I also don't think it's a fad, given how productive the language makes people feel, and the fact the Rust Foundation is very serious about the longevity of the project, and that it has many big-player backers.
There's also obviously others too; people come in about 8 billion flavours.
I don't fall into any of the camps you mentioned specifically. I have been using C++ as my main programming language for a good 15 years and am a big fan of modern C++. I tried Rust for a month (every day) and I just feel like it gets in my way too much and it's just not worth the extra friction. A friend of mine (using Python as a physicist) wanted to try system programming recently and I told them to just try Rust and not trouble themselves with C++. I think Rust is the easier language to learn and probably just as powerful, but C++ just gets in your way less. It's not as hard to use correctly as people pretend it is (though I admit that years of experience and studying are required) and if you can use it relatively well you can write safe code without much trouble and you can also have a very high (higher than Rust) level of control seamlessly at the same time.
I don't know many people with similar preferences, but most of them do game development, if that helps to contextualize a bit. There safety is not as important and development speed is much more important than for other applications.
> It's not as hard to use correctly as people pretend it is (though I admit that years of experience and studying are required)
The original statement and the one in parens are directly at odds with each other. If every C++ dev requires years of experience and studying to use correctly, it follows that they have left years worth of code that is not done correctly in their wake. Also, no other (non-esoteric) language requires this high a barrier to write correctly.
> if you can use it relatively well you can write safe code without much trouble
And yet there isn't a single large C++ project that doesn't suffer from violations of memory safety - the one class of bugs that we know how to eliminate completely, if using a proper runtime system.
Ultimately, I'll use what I have to use. I, personally, don't like Rust's syntax and will miss the static inheritance of templates. There's a lot I won't miss, on the other hand
My biggest issue with most Rust posts is that they set up strawman C++ arguments (that are usually just C code targeting a C++ compiler). I'm sold on all the idea behind Rust and making sure that programmers can't just easily drop down to insecure parts of a language - I just don't think we should be shaming good C++ codebases because we want Rust to "win."
> It’s basically a compiler enforced set of C++ best practices. It’s strange how hostile some in the C++ community are to Rust.
Well, the syntax is alien and new, it doesn't do OO the way 9 out of 10 working developers expect it to, almost all C++ popular design patterns have to be rejected, many of the claims("fearless concurrency") are exaggerated and the Rust evangelists are really really toxic when referring to C++ or C, often simply claiming that fewer bugs is worth the tradeoff from switching to Rust.
I literally saw a comment on HN this past week complaining that OSes are not switching to Rust, almost completely ignoring the fact that any rewrite of a 3 decades old codebase is going to introduce more bugs than it is going to prevent, even if you have perfect memory safety (which you won't, in an OS).
In all honesty, Rust would have been adopted orders of magnitudes faster had Rust evangelists been welcoming, and not accused of being defensive or hostile.
I mean, look through this very page full of comments, and be honest, how many of the comments talking about C++ developers are welcoming to C++ developers?
I've seen an order of magnitude more people complaining about Rust evangelists as I've actually seen Rust evangelists, and they've been significantly more hostile and toxic.
The majority of Rust programmers I know were C++ programmers in the past. Many, including myself, use both professionally.
> I've seen an order of magnitude more people complaining about Rust evangelists as I've actually seen Rust evangelists, and they've been significantly more hostile and toxic.
Does this, to you, look like a response that is welcoming to C++ devs? I gave careful and impassive reasons, and you strike back with literal ad hominem attacks.
This sort of reply is what makes Rust, as a community, look shallow-minded and toxic.
You said Rust evangelists are toxic and exaggerating. I said that I've seen the more of the same in the other direction, and I'm the one striking back with literal ad hominem, and "shallow-minded and toxic"? My response isn't all that difference in tone and content to your own comment, but you've come back way harder at me personally than I was being in general.
I'm not saying it doesn't exist. I'm just saying I've seen way more griping about Rust evangelists than I've seen actual Rust evangelists. For every crazy Rust post like that, I've seen at least 5 of people complaining about crazy rust posts like that. I've seen plenty of articles with comments crapping on Rust evangelists when they weren't even in the comments at all.
There is no "best practice". It depends on context. OOP is good for some things and not that much for others. Same goes for your list of "best" practices. Dismissing a paradigm in totality because some Joe Shmoe of today has declared it non cosher looks rather more like a religious statement than a practical choice.
You have to remember that we die. So what you learn til 30, say, you capitalise on till 70, and then you retire & die.
There isn't another live to live until 30 "again", and then be within the Rust culture.
Rust has, by analogy, stapled it's "Ninety-five Theses to the door" of C++ and those C++atholics are afraid their way of life is ending before they do.
Taking that analogy further, Catholicism didn't die out. Protestantism definitely grew, then there were hostilities and outright fighting for hundreds of years in some cases.
Well it will suck out a lot of potential jobs from the C++ market, at least in the longer time horizon. And many people invested almost their whole lives into doing C++.
the fact we might have got sick of your evangelism and lies hasn't crossed your mind I guess
>It’s basically a compiler enforced set of C++ best practices
Its not, its a whole different programming paradigm where the compiler dictates how you write your software. You dont let your creative facilities to drive you or whats best for your domain - you just obey the language rules...