3 ms·
>What's the particular benefit Rust offers you in such a scenario? Part of the appeal of Rust is memory safety, per-compile correctness, and enforcing best prac
by logicchains 7y ago
>What's the particular benefit Rust offers you in such a scenario? Part of the appeal of Rust is memory safety, per-compile correctness, and enforcing best practices.
It's a modern language: no #includes, faster compilation (compared to template-heavy C++), nice macros, compile-time reflection (libraries like Serde are really nice), generally nicer stdlib than C++, decent package manager. And it's one of the only languages with RAII/destructors, which to me are one of the best things about C++.
>Also, I'd argue that memory safety/rce protection/etc is crucial in games, particularly ones that are online.
This applies to the server, but not to the graphical game client running on the user's machine, as the client is usually not accepting random inbound connections, instead it just connects to the server.
- printango 7y agoThanks. >This applies to the server, but not to the graphical game client running on the user's machine, as the client is usually not accepting random inbound connections, instead it just connects to the server. There have been a few demonstrated RCEs in game clients (especially in P2P models which many modern games use).
- logicchains 7y agoI didn't know that, that's scary :/
- xscott 7y ago> faster compilation You should profile/benchmark that with a couple thousand lines of code... C++ can be slow to compile (although it isn't always), but so can Rust. I will add to your list that Rust generally has nicer error messages.