3 ms·
> memory management > It's just a lack of library support AFAICT. Libraries could help, but game often have a lot of one-off memory stuff too that you can't pu
by Rusky 10y ago
> memory management > It's just a lack of library support AFAICT.
Libraries could help, but game often have a lot of one-off memory stuff too that you can't put in a library and you can't do in safe Rust. Maybe there are some more creative solutions that nobody's had to come up with yet because C makes it so frictionless.
> error handling in Go is at least as bad
The thing is that style lets you ignore errors in cases where the error isn't gonna happen. That's usually bad, but in games it's often fine because you control everything. The equivalent in Rust requires an `unwrap` of some kind which introduces performance and syntactic overhead.
I guess all I'm getting at is that beyond the implementation, there is still design work to be done if we want Rust to work well for games.
- mmstick 10y ago> The thing is that style lets you ignore errors in cases where the error isn't gonna happen. That's usually bad, but in games it's often fine because you control everything. The equivalent in Rust requires an `unwrap` of some kind which introduces performance and syntactic overhead. The contradiction in your logic here is that if you don't want to handle errors, then don't design your functions to return errors. In addition, many of the larger time game studios write and use their own standard library, so they could devise an efficient 'game stdlib' where they don't have to pay such costs.