|
|
| | Ask HN: Why would you ever use C++ for a new project over Rust? | | 32 points by rbnsl on April 1, 2024 | hide | past | favorite | 39 comments | | Was having this debate with a coworker recently who’s a Rust fanatic and prior C++ eng; he said the tooling and support has gotten so good you would just be shooting yourself in the foot if you ever started something new on C++. I wasn’t convinced but is this really the case? Like if you had equal skill in both, is there ever a case for doing a project in C++ (outside of being forced by the platform you’re working on or anything outside your control)? |
|

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact
|
And in the case of apps where objects can have very dynamic lifetimes (like game engines or CAD), the borrow checker wouldn't really help with you that much since you would have to manage these with reference counting or some other way anyway (ex. arena allocation + generational indices).
What Rust excels over C++ at this point is just sane defaults / less footguns (no uninitialized memory, bounds checking even in release mode) as well as some language niceties, but Rust has its own issues for pragmatic usage (slow compilation, lackluster libraries, cumbersome to interface with C APIs, ...)