3 ms·
I would say many (not all) game engines could probably be converted, by finding common pattern in usage of inheritance and mapping it to rust patterns. EDIT: T
by dathinab 5y ago
I would say many (not all) game engines could probably be converted, by finding common pattern in usage of inheritance and mapping it to rust patterns.
EDIT: Through automatizing this, or making C++ to rust bindings for it would be hard.
I mean creating inheritance graphs for entities is as far as I know already seen as an anti pattern since a while.
Things like ECM are nicely re-presentable in rust.
Many patterns of inheritance for code re-use tent to also not be too hard to represent in rust.
But I would argue that even if rust had inheritance engines like Unreal Engine would not be ported, at least not until they do a major rewrite anyway. Because of it being a lot of work with not too much intermediate gains.
- biesnecker 5y agoThere's a pretty wide gap, though, between "nicely representable in rust" and "mechanically translatable from the C++ implementation" that mostly requires human effort to span.
- dathinab 5y agoYes, though even if rust had inheritance I don't think you would have a machine translatable mapping good enough to port a game engine. Generally for any language which in design isn't "somewhat close to C++" I don't think this would work.
- Animats 5y agoRight. C++ to Rust is a big jump. C++ to C# or Java or D might be automatable. At least the object model is roughly compatible.