I'm just a programmer who's been doing this for 20 years. I don't have the credentials of Mark, who is a legend. But I fully agree with him. There will be specific exceptions, but if you have the choice between Rust and C++ you would be making a big mistake to not choose Rust. The language is simpler, cleaner, safer, and more enjoyable to work with. The build tools are far more pleasant. The IDE experience is comparable. The hiring market is way better for Rust because it's not mainstream. Programmers currently using Rust are superior to programmers using C++, statistically speaking. There's a vast difference between individuals, but with only that one data point you can tell quite a lot. People learn C++ in college. People learn Rust because they love their craft. I stopped using C++ after I learned Rust. I still use Go sometimes, when appropriate, and I use other languages in my day job. I have a lot of experience in C++, much more than with Rust. The borrow checker still drives me mad. I've worked in over twenty languages over the years. Languages are tools, try to be impartial and pick the best tool for the job. Your personal tastes don't matter unless it's your personal project.
> The language is simpler, cleaner, safer, and more enjoyable to work with.
I was a Rust v1 contributor. I have great hopes for the language as a replacement for c in systems engineering. However, I much prefer C++ 20 for the kind of work I do (scientific computing). Rust isn't a competitor to C++ in that arena, in my humble opinion.
> Programmers currently using Rust are superior to programmers using C++, statistically speaking
The phrase 'statistically speaking' suggests the collection of empirical data. Could you elaborate?
> People learn Rust because they love their craft.
If Rust becomes popular enough, this will no longer be any truer than for people who learn c++.
> I was a Rust v1 contributor. I have great hopes for the language as a replacement for c in systems engineering. However, I much prefer C++ 20 for the kind of work I do (scientific computing). Rust isn't a competitor to C++ in that arena, in my humble opinion.
There's a lot of domains where Rust isn't an appropriate replacement. Notice I phrased it as "if you have the choice between Rust and C++". Often times because of libraries/frameworks you need, that may not really be a choice.
> The phrase 'statistically speaking' suggests the collection of empirical data. Could you elaborate?
I don't have data apart from two decades of screening candidates and conducting interviews. I've heard this from other people, including Paul Graham, and I've seen it in my personal experience. I probably should have chosen different wording to not mislead people that this is backed by hard data.
> If Rust becomes popular enough, this will no longer be any truer than for people who learn c++.
That's how it goes. Python was once a signal for finding better developers. That's no longer true.
Very interesting. I am working on something that I hope will also appeal to people doing scientific computing. Could you say a few words about why you prefer C++20 over Rust for scientific computing?
I think I hit a nerve with this one. If you put out a job ad for any mainstream language (Java, JavaScript, C++, among others) you're inundated by applicants who have no business even working in this industry. If you put an esoteric language like Elixir or Rust, you get a smaller but much higher quality pool of applicants. That's my personal experience, I don't have hard data to back it up. Paul Graham once wrote about this effect in his Great Hackers essay [1].
Of course, the flip side of that is with a smaller pool of applicants, filling the position may not be any easier. It is harder to hire a poor candidate though.
John Carmack has actually played around with Rust. But I would like to reiterate that when generalizing about a population based on statistics, you might be correct more often than you'd be wrong (.e.g. men are more aggressive than women) but you can still easily find individuals who are exceptions. That you can find an exception doesn't disprove the rule. You still have to treat people as individuals, and not as a population. That should go without saying.
It does tend to grate on people when you have developers from a certain community going and calling anybody that doesn't agree with their "One True Way" inferior and not loving their craft. This is literally the No True Scotsman fallacy to a tee. You're essentially saying, "Only a true programmer that loves their craft would use Rust. Clearly if you're not using Rust, you're not a true programmer". Yeah, sure.
I'll say this for the millionth time, I've seen great code in C++, I've seen terrible code in C++. I've seen great code in Python, I've seen terrible code in Python. I've seen great code in Typescript, I've seen terrible code in Typescript. I personally don't look at Rust code, but I'm willing to bet that there's great Rust code, and terrible Rust code. It turns out, the language is not the variable in this equation, it's the developer.
> That's my personal experience, I don't have hard data to back it up.
So, statistically speaking, you're making this up out of thin air.
> That you can find an exception doesn't disprove the rule. You still have to treat people as individuals, and not as a population. That should go without saying.
Exactly, which is why saying something like:
>> People learn C++ in college. People learn Rust because they love their craft.
Is such a radical statement. I don't see people from other programming language communities talk like this. It's amazing to me that people from the Rust community think saying things like, "If you don't learn Rust, it must be because you don't love your craft" is a verifiable fact.
I know it's a crazy thought to have, but maybe, just maybe, people can like different things...?
No, if you're paying attention, what I'm saying is there is no financial incentive to learn Rust, it's not going to help land you a job. You won't learn it in college, you won't learn it at work. So if you know Rust it's because you enjoy your craft enough to invest your own time in learning it just because you're curious about it. So given no other data points, I can guess that the Rust programmer is better than the C++ programmer and be right more often than not. That's not a radical statement, it's pretty intuitive when you think about it. It's not specific to Rust either. I can say the same of any esoteric language. When I see languages like that on a resume, that's a positive signal, even when hiring for C++.
It sounded like they were saying "both pools have a lot of qualified applicants, but C++ has incentives to draw an additional flood of un/under-qualified applicants that haven't started to apply to Rust yet".
In what way does it change the meaning? As I read it, "statistically speaking" is just being used as a parenthetical phrase to qualify that they're not trying to argue literally every rust programmer is superior to literally every c++ programmer, and can be safely omitted so long as no one tries to make some dumb argument like "well I've met one bad rust programmer before" or "so and so is a great programmer and they choose c++."
You cut out part of my full statement which entirely changes the meaning ;)
Here it is in context:
> So I guess John Carmack is inferior and is not an ultimate craftsman.
I didn't realize that their are statistics on what constitutes a craftsman. But I'm willing to change my mind. I'm very curious what those statistics measure though.
Edit: Not to mention like peteradio pointed out, what does a statistically superior programmer look like and where do those statistics live?
I mean the argument is made that Rust is not mainstream, but if you were to pull in e.g. Java or Javascript apps in that comparison I'm confident it would make C++ look like a non-mainstream language too.
edit: numbers say I'm wrong, C++ is more mainstream than C#, C is more mainstream than Java: https://www.tiobe.com/tiobe-index/. I mean I doubt this source (it seems to indicate objective-C, which is all but superseded by swift, is on the rise) but it's at least one datapoint.
> People learn Rust because they love their craft.
We're exchanging opinions here without any kind of data to back either claim, but let me offer a contrarian view: people who learn niche-language-X because they love their craft are mostly younger folk with little experience in programming. My reasoning for this is that you get less and less time to pursue your love for a programming language when said love competes with love for your SO, your kids, and all the other things that happen to most people later in life.
It's anecdotal, but in my experience people who learn niche languages because of love or fashion are not the kind of people who will help write high-quality libraries for the ecosystem. For that, you need a stable, sizeable "middle class" - people who already know what their doing, who were able to evaluate the tool objectively, and who found a real value in it. Such people are not easy to come by: IME by the time they have enough experience, they mostly lost the eagerness to evaluate every shiny new thing that comes along.
> The hiring market is way better for Rust because it's not mainstream.
I would like to see the statistics you base this opinion on. In my experience (also 20+ years of programming here) this effect is more than offset by the small pool of applicants.
> Languages are tools, try to be impartial and pick the best tool for the job.
Yes. But you need to account for more than just technical features of a tool, like hiring or the opposition from the existing team to learning the tool. Choosing Rust when you have 20 seasoned, experienced C++ devs just because cargo is better than CMake... might not be the greatest of ideas.
And sometimes people who love their craft pick the wrong tool (their favorite) for the job, write really shitty code and are hyper-defensive about it, regardless of the language.
I want people who have a history of picking the right tool for the job, and see their job as a team sport instead of a personal art project. Not a hiring manager, but I'd be more interested why someone with knowledge of Rust picked Rust over other options. Mere knowledge of it implies nothing of substance, and I've cleaned up too many mistakes in my career written by people who put their craft ahead of their mission.
As someone that is looking to learn one or the other (and hopefully be able to utilize it to land a job too), is the recommendation to skip learning C++ at this point and learn Rust instead? I was going to learn how to write a game boy emulator, which could be written in either, but I’d also like the language to help me in the professional world as someone getting ready to enter the field.
You'll have a harder time finding work, as there aren't a lot of Rust jobs. That's why it's a signal that a person loves their craft - there's little financial incentive in learning it. When it comes to finding work, pick a mainstream language. This will change over time as Rust becomes mainstream, which I think is likely.
Thanks. My plan will be to follow along https://www.learncpp.com/ and then check out the Rust book later on then. I've found previous success in learning an older language that a newer one can replace (JavaScript to TypeScript) as it helps me understand why devs might prefer the newer language and what it aims to solve. It's a lot of learning, but perhaps that is a necessary evil to grow into a strong developer.
Because total greenfield projects in systems languages is still a pretty rare thing. Writing a new game with a C++ game engine isn't going to count, for example, and that means quite few things will.
I actually think it is quite widely used in this small niche. Don't have any data to back it up and my newsfeed is probably biased.