4 ms·
Why not C++, if performance was an issue?
by mister_hn 7y ago
Why not C++, if performance was an issue?
- wmf 7y agoWhy C++? Why would you want the same performance as Rust with less safety?
- loeg 7y agoWhy would you pick C++ for a new codebase in 2019 or 2020 if Rust met your needs?
- terminaljunkid 7y agoProgrammer productivity Library support
- nuclx 7y agoCompilation times.
- Narishma 7y agoIn my experience, C++ is slower to compile than Rust.
- bluGill 7y agoModern C++ is the right choice if you have an existing code base in C++, or you need to use features that only exist in a third party C++ library - there is a large collection of C++ libraries to choose from. Their use case doesn't seem to have either consideration (note that even when these are considerations a hybrid of languages is often a good idea) so there isn't a compelling reason to choose C++. That doesn't mean C++ is wrong, just that there is nothing wrong with rust. Maybe a great C++ programmer can get a few tenths of a percent faster code (mostly because compiler writers spend more effort figuring out how to optimize C++ - rust uses the same llvm optimizer but it might sometimes do something less optimal because it assumed C++ input), but in general if the difference matters in your environment you are too close to the edge and need to scale. Rust might be easier/faster to write than modern C++. If so that is a point in favor of rust. They seem to have people who know rust, which is important. There might be more people who know C++, but I can take any great programmer and make them good in any programming language in a few weeks in the worst case (worst case would be writing a large program in intercal or some such intentionally hard language) - not to be confused with expert which takes more experience.