I think you see some of that since quite a few people have spent decades in C/C++(myself included) and have had exposure to experiencing these exact problems.
I'm still a huge fan of C++ but Rust gets me to where I want to go with C++ with much less fuss and a lot more confidence.
Interesting. In my experience, seasoned C++ programmers grasp the advantages of Rust very quickly. Not all of them are convinced that the advantages outweigh the practical problems, but they don't deny the existence of the advantages.
It's the opposite of my experience. The mental load of Rust is lower than C++ because I can trust the compiler to take care of and track ownership and lifetimes, whereas with C++ that has to be done manually.
And yes, I aware of all the bells and whistles modern c++ can bring to alleviate some of that burden - but people can and do subvert those mechanisms intentionally and unintentionally, especially over refactors.
C++ and C are easy to get into a working state, and then you bit by bit discover your mistakes. Rust forces that information up front, and that can be problematic for people who aren't used to it ( and just want to get a back up and running, which is unfortunately too many real world systems).
I had a similar conversation with someone who I consider an expert in C++ after a few months of working in C++ for the first time, and I said basically the same thing you did (only already having Rust in mind when I made my comment). To my surprise, he mentioned Rust immediately, instead of my having to bring it up. Having learned C++ after Rust, I had kind of assumed that my view of Rust as a sort of reboot of C++ wasn't going to be shared by someone with so much C++ experience.
The way I think about it is that Rust exposes all the hard stuff that's hidden in C++.
C++ makes things look simpler than they are and eventually you end up in one nightmare scenario after another, because of all the hidden complexity.
Rust just shoves all that complexity to the forefront, right in your face, so that you are forced to deal with it and don't end up in nightmare land later.
As C++ developers, though, we are a biased bunch. C++ takes years to properly learn and gain confidence with, something we're completely oblivious to since that learning curve is in the past. I concede that for people who don't already know C++, Rust may be a good choice.
I love Rust but man, what a weird way to introduce it. The bashing on C++ was a bit silly - the biggest benefit over C++ IMO is that Rust makes it much easier to avoid certain kinds of memory bugs.
Note that I said easier: C++ allows that avoidance of bugs too, especially modern C++, and the ISOs do a lot to encourage the right stuff, but its still a very mixed bag in my personal experience. There are also plenty of bad idioms in the C++ space that people blindly follow, so there is some diligence required.
Also, I have to add for that one guy typing a reply to me now: this isn't to say C++ devs are inferior. In fact far from it, there are some seriously smart people in that space that I deeply respect. But its important to distinguish the devs from the tool, and when we are talking JUST about the tool, Rust seems like a good pick here.
The situation described in the video can and probably does happen to C++ codebases as well, if not even more than Rust. It's easier to be good at Rust than it is to be at C++, even if C++ seems easier at first.
I'm not sure about that. I've spent 18 years programming in C++, for much of that time in a senior professional capacity and am excited to learn Rust for whatever my next project will be. Most of my colleagues and peers feel the same. I think the person you are characterising is quite rare. I like C++ but don't love all of the baggage and am delighted that things are moving forward.
Interesting. I feel like most C++ programmers I meet have a high level of enthusiasm for Rust, as it has C++'s high/low level blend and the safety helps prevent more footguns.
No kidding. Effective Modern C++ was what got me to actually start learning Rust.
That being said I feel Rust has a lot of paper cuts that slow people down too. Perhaps the silver lining is that they are more like barricades than minefields.
People bounce off of systems programming because C/C++ is hard. Rust's focus on ergonomics, error management, tooling and learning resources actually makes people want to try again.
Really? Coming from C++, learning Rust felt very natural and welcome because it put a name and a structure to the mental model I had been using to keep a semblance of sanity while doing C++. Maybe learning primarily with C++11 was a factor?
I went through pretty much the exact same process several years ago, coming from the same place of deep C++ expertise. Rust has some cool stuff, but it also requires learning a ton of new practices, and C++ is getting better fast enough that it just doesn't seem worthwhile to switch.
As a C developer who has never really used C++ or Rust I sort of agree. Looking at Rust introductory guides I increasingly get the same feeling as looking at C++ things, where there's just _too much_ of everything. I know it's a subjective feeling that is probably unfair to the language, but it's still the impression I get.
I'm confident if I actually put in the work to learn Rust I would end up liking it and I plan on doing that at some point, but it certainly doesn't help my motivation.
My experience in C++ prior to 20 is that it is a lot more verbose/boilerplatey than Rust. I'd love to see that get better, but I think C++ is starting from significantly behind.
Yea, I see your point, lumping Rust in with Python or Go isn't really fair nor accurate.
Totally agree C++ definitely has pain points still, but I do love the fact C++ is getting pretty regular updates so it is getting better and less painful generally. Rust is something I want to use in production but haven't seen the right opportunity to do it where the risk to reward ratio was right, yet.
I'm still a huge fan of C++ but Rust gets me to where I want to go with C++ with much less fuss and a lot more confidence.
reply