You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This would open up a whole can of worms with regard to inheritance in rust. Currently we can avoid a lot of the issues that inheritance brings from a programming language design perspective since we statically know all the classes you can inherit from. But things like variance and type safety in the presence of arbitrary inheritance could be really difficult to sort out.
#334 is a proposal for a more restricted kind of inheritance. Where we allow the creation of a single abstract base class for an enum. Something like that is more feasible, and even then the discussion there shows how many issues there are to sort out.
At the moment, it's not planned. The benefits are relatively small compared to all the issues it brings, and inheritance is not an abstraction mechanism you would choose within Rust itself. Traits and composition should be preferred when possible.
Currently we use existing base classes that are exposed via GDExtension (for example Node and NodeVirtual).
What would it take to create a custom base class in rust?
The text was updated successfully, but these errors were encountered: