Comment by int_19h
3 months ago
But then the question becomes - why Rust, if you deliberately work around its single most prominent distinguishing feature?
3 months ago
But then the question becomes - why Rust, if you deliberately work around its single most prominent distinguishing feature?
The main feature of rust isn't borrow checking, the feature is safe low level programming. Borrow checking is Rust's default way of doing this, but it's not the only one (the standard library has Reference Counting primitives built in).
Borrow checking is a way to make manual memory management safe, ECS works around manual memory management entirely, so it doesn't need borrow checking to be safe (which is also why it's popular in C++, which doesn't have a borrow checker) but because it's Rust, you have strong guarantees about the safety of it, while in C++ you can still shoot yourself in the foot if you don't use ECS the right way.
Also Rust is more than safety: https://steveklabnik.com/writing/rust-is-more-than-safety
I would argue that borrow checking is the only feature that is actually unique (more or less) to Rust. If you don't need it, you can get the rest from elsewhere, often with better ergonomics.
If you don't care about performance, then sure.
If you want to squeeze the maximum performance of your hardware (which is indeed the case for game engines) then all your options are Rust, C and C++. In which case is by far the more ergonomic choice on every aspects.
2 replies →