Live data from Hacker News

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

news.ycombinator.com

31–40 of 92 posts

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

#31
post #28

Earlier quoted context omitted.

I don't disagree that broader platform support is a reason to choose C++, but Rust is just as capable at integrating with the specific platforms you're talking about.

> Rust is just as capable at integrating with the specific platforms you're talking about. Maybe it’s possible but definitely not as straightforward to use rust on iOS. Compared to C++.

I have not personally used C++ or Rust in this context, so I can’t speak to the ease of either, so could you say more?

The use-cases I know of basically build a library exposing the C ABI, which is slightly annoying but effective. I'm guessing you're referring to Swift C++ interop?

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

#32
I've heard from some of my colleagues at other companies that Rust has a significant negative impact on developer productivity compared to C++. This makes Rust great for, say, the Linux kernel, where the security and performance features are really needed and the maintainers don't give a rat's ass about how much time and effort it takes for contributors to get their features merged. On the other hand my current company already has significant challenges in the area of developer productivity, and it could very well be that requiring Rust for a new internal project would doom it from the start just for that reason.

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

#33
post #18

Firstly, my background is in Haskell and Rust. I generally defer to safety-conscious languages. So please no responses extolling the virtues of type safety, type systems, etc. I know, I agree, but that doesn't change what I'm going to say. Rust is awesome, but honestly modern c++ is quickly catching up. Rust has safety going for it, but one of the issues is that sometimes you have to be more inefficient for it (refer…

Agree with your assessment of C++. A lot of things have improved in modern C++ over the last 10 years, but C++ has a serious PR problem. Part of this is that it's been changing pretty quickly and people wonder if they should come up to speed on modern C++ or just learn something new (like Rust or Carbon) and in many cases people just decided to do the latter because coming up to speed on C++20 is basically like learning a new language anyway.

Still, the remaining big deficiency that C++ has now over more modern languages like Rust is library management. The C++ standards folks seem to say every couple of years that library management is the next big thing on their schedule for the next C++ release, but it gets delayed until later.

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

#34

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?

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

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

#35
You really want to be using C++ and Rust as little as possible - ideally only for high-performance code. The rest of your application should be developed using a RAD language like C# or Kotlin. Interoperability between C# and C++ right now is really great with first-party build tooling support from MS. Rust, as far as I know, doesn't have a great interoperability story with any other language except for, ironically, C++ based on this[0].

[0]https://www.hobofan.com/rust-interop/

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

#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?

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

#38

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?

Compile time, async, steep learning curve are things that come to mind

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

#39

I used to have parallel feelings about Scala as a newer better alternative to Java. Then I ran into some issues with it in the real world. See if there are any parallel, I will copy-paste the issues I reported before: "There were some problems with Scala in the real world. Compared to Java it had a big learning curve, what with all the features it took from Haskell and functional programming while also keeping all th…

This is spot on. Scala is a powerful language and we get a lot of milage out of it, but it's despite the Scala ecosystem, not because of it.

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

#40
post #18

Firstly, my background is in Haskell and Rust. I generally defer to safety-conscious languages. So please no responses extolling the virtues of type safety, type systems, etc. I know, I agree, but that doesn't change what I'm going to say. Rust is awesome, but honestly modern c++ is quickly catching up. Rust has safety going for it, but one of the issues is that sometimes you have to be more inefficient for it (refer…

Is there a reliable way to enforce some subset of C++? I feel like the biggest disadvantage of C++ is too many features and their unpredictable interaction.
Post reply on HN