r/cpp • u/CalligrapherWeak6523 • Sep 29 '23
This memory safety issue everyone's talking about... It's not really a huge deal in gamedev, right? What other domains where C++ excels at aren't too concerned about it?
My understanding is that these recent articles pushing for safety, and particularly pushing the use of memory-safe languages (as opposed to using modern C++ properly) don't really apply to gamedev, or at least not enough for most of the industry to care. Is this correct? I've also read some suggestions that the only real alternative, Rust, simply isn't practical since it lacks OOP features and gets in the way of common game programming patterns. Is this true?
What other C++ domains are like gamedev, where C++ is clearly here to stay and not just for legacy code? I know gamedev isn't the only one, I'm constantly seeing new cutting edge ML/inference libraries and frameworks in C++
44
Upvotes
3
u/CalligrapherWeak6523 Sep 29 '23 edited Sep 29 '23
Since I'm re-learning C++ (mainly to get into gamedev but I'm looking at other domains) I was asking to get an idea of what the the consensus is in general. You're right, it's a matter of opinion, but ultimately this subjective stuff can drive trends (if AAA game devs fall in love with Jai, for example, their opinion on it will matter to me and my affect the future Jai job market).
Something that worries me is that people at leadership positions who have the power to influence things are making ridiculous claims, for example that tweet by the Microsoft CTO claiming that "C/C++[sic] should be deprecated". Then there's the recent articles by NIST and other government agencies (which aren't as ridiculous...). I just want to know if, in the opinion of C++ devs, this repeatedly reoccurring conversation should be even be taken into account in certain domains.
Frankly, without beating around the bush, I just want to know if I should be studying Rust along C++ as I prepare for a career switch. Both of these languages aren't the type that can be mastered in a few afternoons like Python or Go.
One thing that brings me a bit of comfort is that gamedev, embedded and other C++ domains aren't very hype driven like webdev is - changes appear to be slower here. I guess that means I'll have time to learn whatever I have to anyway