3 ms·
The author does mention Rust: > New and hip GC'd languages don't care about the priorities efficient game engine code has. Safety-enforcing languages like Rust
by Rusky 11y ago
The author does mention Rust:
> New and hip GC'd languages don't care about the priorities efficient game engine code has. Safety-enforcing languages like Rust are going somewhat off already by definition, as they're focusing primarily on safety, which is not the focus for most game code.
However, I disagree with this. Rust does enforce safety, but once you have a feel for how the borrow checker works (which isn't hard at all coming from C or C++), it fades into the background. The real benefits of Rust for games are the build system, the module system, affine/linear types, and all the various syntactic features like pattern matching and expression-based control structures that make it way less crufty to read and write than C or C++.
Rust's biggest weakness for game dev (again) isn't the enforced safety, but the still-growing ecosystem. There's a few really good low-level libraries (Glium, for example), but if you stray beyond them it turns into a nightmare of writing your own FFI definitions and unsafe glue code.
- dllthomas 11y agoRight. The last ultra-performance-oriented work I did (in C) I'd have loved affine types and a borrow checker. Used right, these kinds of tools not only don't get in the way (as you note) but prove tremendously useful when you need to refactor.
- munchbunny 11y agoThe library thing is huge. If you're in C++ land you've got UE4 and a large number of open source graphics engines (Ogre3D), plus far more options in every category of engine (OpenAL, Box2D, and so on). If you're in .NET/Mono land you've got Unity and a plethora of engines built around Unity. It's ridiculous how much work these engines will save you, once you know how to use them, but ecosystem is key because these engines are HUGE.