Live data from Hacker News

Ask HN: Are there any good reasons to use C++ over Rust for new projects today?

news.ycombinator.com

41–50 of 92 posts

Re: Ask HN: Are there any good reasons to use C++ over Rust for new projects today?

#42

I am a retiring engineer/entrepreneur. I made a lot of money with C++. It is hard for me to tell anyone not to use it. I recently developed an oil and gas derivative tool in Rust. IMO Rust has a long way to go. It reminds me of OCaml. I spent 2 years developing a Compliance System on DEC/OSF1 in OCaml. We made the mistake of adopting that language too early. Also, the C++ community is a lot more tolerant. A big plus…

In which ways does Rust need to improve, in your opinion?

[dead]

Re: Ask HN: Are there any good reasons to use C++ over Rust for new projects today?

#43
post #3

If you need to interact with existing C++ code or libraries obviously C++ is going to be a much easier path than using Rust. If you don't have such a requirement, or you think that the available Rust libraries are good enough for what you're doing, then use whatever you want.

This is it. C++ has the huge advantage of being able to use the entire ecosystem of existing C++ and C libraries without any kind of bindings.

When you'd need to make your own Rust bindings or rely on some third-party project which may or may not be actively maintained, then C++ is more attractive.

Re: Ask HN: Are there any good reasons to use C++ over Rust for new projects today?

#44

I am a retiring engineer/entrepreneur. I made a lot of money with C++. It is hard for me to tell anyone not to use it. I recently developed an oil and gas derivative tool in Rust. IMO Rust has a long way to go. It reminds me of OCaml. I spent 2 years developing a Compliance System on DEC/OSF1 in OCaml. We made the mistake of adopting that language too early. Also, the C++ community is a lot more tolerant. A big plus…

> Also, the C++ community is a lot more tolerant.

Yeah the biggest turnoff for me with Rust isn't even the language anymore, but the community surrounding it.

I realize it's mostly a vocal minority and the vast majority of Rust people, including the ones I know personally, are very nice. But boy are there some obnoxious Rust evangelists out there.

Re: Ask HN: Are there any good reasons to use C++ over Rust for new projects today?

#45
post #36

I am a retiring engineer/entrepreneur. I made a lot of money with C++. It is hard for me to tell anyone not to use it. I recently developed an oil and gas derivative tool in Rust. IMO Rust has a long way to go. It reminds me of OCaml. I spent 2 years developing a Compliance System on DEC/OSF1 in OCaml. We made the mistake of adopting that language too early. Also, the C++ community is a lot more tolerant. A big plus…

Tolerant towards what exactly?

[dead]

Re: Ask HN: Are there any good reasons to use C++ over Rust for new projects today?

#46
Ultimately, the core argument for Rust isn't technical; there's nothing one can do in Rust that can't also be done in C/C++. From the point of view a single experienced C dev Rust might look like an overcomplexification.

The real gain Rust brings is in the social dynamics of programming. Junior coders can be involved with low-level code with much less chances of breaking stuff. Seniors can push the envelope further while keeping the code maintainable by future contributors.

In general, Rust sets a much more level playing field. This is a major advantage for any long lived project but it can be hard to see it if you're already set in the ways of C and unconcerned about the lifecycle of code outside of your hands.

Re: Ask HN: Are there any good reasons to use C++ over Rust for new projects today?

#47

Earlier quoted context omitted.

In which ways does Rust need to improve, in your opinion?

Here we go. I'm not taking this bait.

I’m not trying to bait you, and people who attack you for what you say are morons.

I don’t have much experience in either language, and I don’t have an opinion on which is better. I am just interested in your opinion.

Re: Ask HN: Are there any good reasons to use C++ over Rust for new projects today?

#48

The benefit of using Rust is that management of 3d party libraries compared to C++ is a lot easier with cargo, so you can do things quicker. The downside to using Rust is that its still an evolving language so you may have to refactor your code down the line. Generally Rust use case is targeted towards enterprise software, where you have lots of people working on it, and it needs to be fast, and you want to minimize…

I've had to refactor a heck of a lot more C++ than Rust. C++11, std::optional, concepts and ranges, std::format, etc. It's not even that I dislike these changes necessarily, but you're always rewriting C++ to keep up with the language. In rust it's mainly been nightly stuff getting merged to stable, pre-1.0, and async. Much more stable overall.

> you're always rewriting C++ to keep up with the language

If that's what you want to do, which is a big if. I guess strictly speaking the same is true for Rust but in Rust, with it being new, it "feels" more like I should keep up (at least for me). In c++, I would mostly just not mess with old code that works...

Re: Ask HN: Are there any good reasons to use C++ over Rust for new projects today?

#50

C++ seems easier to work with, tools for C++ are plenty and more mature, so if productivity and speed of development matters, those are good reasons to use C++.

Plenty & mature != Easy to work with. Ever had to run make from within CMake? (so that's a build system generator running a build system while generating a build system...)
Post reply on HN