Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Personally, I use rust for the ability to go as fast as C++ but with far fewer footguns. Not to mention that I personally really enjoy how they made algebraic data types and package management first class.

I suspect that if you really spent time learning rust that you'd really appreciate it coming from C++.



When I just want the ability to go as fast as conventional readable C++, I use C# instead. Compared to conventional C++, C# is typically only slightly worse in terms of performance. C# is safer than Rust, and the usability is IMO an order of magnitude better. Just the compilation speed is already a huge contributing factor.

I use C++ for 2 main reasons, integration with other software or libraries, and performance.

When I need the performance, I don’t write conventional C++. I implement custom data structures, usually use vector intrinsics, sometimes use other platform intrinsics like BMI2, sometimes implement custom threading strategies on top of OpenMP or other platform-supplied thread pools. Most of these things are impossible or very hard to express in idiomatic safe Rust, which means the language constantly gets in the way.

Also, most programs contain both performance critical and performance agnostic pieces. When both pieces have non-trivial complexity, I typically use both C# and C++ for the software. Often the frontend part is in .NET, and the performance-critical backend is in C++ DLL.


I believe rust is actually more thread safe than C#, though the other points you made are pretty true.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: