Hacker News new | ask | show | jobs
by dathinab 1018 days ago
yes, except thats why you use stuff like ECS systems

which involve fundamental data structures so writing them might involve unsafe rust code

but using them doesn't and they work as well in rust as outside

similar resource/allocation pools in combination with handles into them are a common practice to improve performance, and they work well in rust too (through like e.g. an ECS they often are unsafe to write but safe to use)

So while I would agree that "Arc the hell out" doesn't work for game engines (but IMHO does work for GUIs), I also would argue that if you use common patterns you anyway might have used anyway for better performance, complexity handling and/or reduction of the consequences of buggy code (e.g. prevent crashes) you don't have a problem with using rust.

Through I guess that makes writing "toy" games where you normally wouldn't bother with such patterns a much less nice experience to write in rust.