Every language has its own merits, there's no single language that's universally the best for every task. With that said, C++ and Rust both occupy similar domains (high-performance, low-level, often interacts with OS syscalls or hardware). Pros of C++: - More mature, excellent library ecosystem, decades of code to reference from. - Syntax is arguably easier to read and write - It's very popular (top 6th language on G…
Ask HN: Are there any good reasons to use C++ over Rust for new projects today?
61–70 of 92 posts
Re: Ask HN: Are there any good reasons to use C++ over Rust for new projects today?
#62I 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?
Makes me miss go, which has channels build in, has a runtime built in, and both are generally solid. None of use flavor A for this, use flavor B for that, or write wrappers for the wrong color function.
Re: Ask HN: Are there any good reasons to use C++ over Rust for new projects today?
#63I'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 compa…
Re: Ask HN: Are there any good reasons to use C++ over Rust for new projects today?
#64I'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 compa…
the hiring pool may be smaller, but don't believe the fear.
Re: Ask HN: Are there any good reasons to use C++ over Rust for new projects today?
#65Every language has its own merits, there's no single language that's universally the best for every task. With that said, C++ and Rust both occupy similar domains (high-performance, low-level, often interacts with OS syscalls or hardware). Pros of C++: - More mature, excellent library ecosystem, decades of code to reference from. - Syntax is arguably easier to read and write - It's very popular (top 6th language on G…
This generally comes down more to familiarity than "ease". C/C++ are familiar.
Re: Ask HN: Are there any good reasons to use C++ over Rust for new projects today?
#66One I don't see mentioned here is market. There are far more c++ developers out there. Whether you're writing a library that someone else will be using, or you want to hire people (or have people contribute), c++ is a much larger "market". This doesn't mean I'm necessarily advocating for c++ or rust, but c++ definitely has advantages over rust, even if they're not just intrinsic.
Rust has good FFI with C++ meaning that you can write Rust libraries that are consumed by C++ programs. C++ developers understand all of the concepts needed to easily pick up Rust. As long as it's not a quick project that will be immediately thrown away getting C++ to use Rust will be worth it.
Re: Ask HN: Are there any good reasons to use C++ over Rust for new projects today?
#67I'm "Rust curious", but I'm coming from a web/app background (Dart, JS, TS, Java, Python), so take my ideas with a grain of salt. 1. One context, which appears to be yours, is when a team or individual has extensive C++ experience. You see, for me, learning C++ with all its decades of good/bad parts feels overwhelming, so Rust makes sense for me even if it's still the hardest language I've ever learned, but as you ar…
Look at it like Mathematics. You learn Algebra, and Trig, but Calculus is a something different. If you don't have a solid understanding of the previous, you're not going to understand the symbolic manipulation of Calculus. It then gets worse from there as you go into Differential Equations.
IMO procedural and imperative programming should be understood before trying to grasp polymorphic, object-oriented and functional programming. There is a lot of abstraction, and training of your mind to abstract is a process.
Be careful, there are purists that exist out there, and they will scream and complain, but ignore them. Don't let others control how you think. A late professor of mine once told me something I thought I understood, but it didn't hit me until years later.
"Any program written in any language that produces the correct results is a correct program."
As long as it does what it is supposed to do, it doesn't matter how you get there.
Also, code purity is myth, and those seeking it are believers in mysticism and false aesthetics. There is good code organization, but when you're up against deadlines, good luck keeping it organized.
This memory safety issue is important, don't get me wrong, but it is completely over blown. SpaceX built incredible rockets and systems in C/C++. We have external tools to check for these issues, and they still need to be used with Rust.
Re: Ask HN: Are there any good reasons to use C++ over Rust for new projects today?
#681. Much faster compilation speed.
2. Having to syntactically specify ownership is annoying and a waste of time in many cases. Unless you need the hand-holding, but then low-level programming isn't for you. :P
3. Multiple compilers. Ironing out bugs is easier when you have both clang, gcc, and msvc.
4. Valgrind and other tools for debugging, profiling, and analysis.
5. Personally, I find Rust's syntax obnoxious and cluttered. With C++, most of the clutter can be avoided which I like.
Re: Ask HN: Are there any good reasons to use C++ over Rust for new projects today?
#69I'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 compa…
Developing in Rust can feel like fighting the compiler though when choosing approaches / architecture that aren't a good fit for Rust. This happens a lot when people only have little Rust experience. For example: Writing a linked list can be quite challenging in Rust due to self-referential types. With more experience in Rust, developer learn how to best structure the code so that it doesn't result in this friction.
Re: Ask HN: Are there any good reasons to use C++ over Rust for new projects today?
#70I 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…
Sounds cool! Could you elaborate? Would you have a website somewhere? Do you have any contacts details?
Cheers!