abc
September 7, 2014, 1:11pm
1
As a new Rust programmer I started writing some small games, I quickly found out that it was very frustrating to not being able to inheritance structs (easily).
Is it planned to make it possible to inheritance structs?
See https://stackoverflow.com/questions/23623957/how-to-typecast-and-inherit-rust-structs
There are currently mainly two competing proposals for adding inheritance to Rust:
RFC PR 142 : Efficient single inheritance.
RFC PR 223 : Trait based inheritance.
Personally I lean towards the latter as it is more orthogonal and flexible, but both have their pros and cons.
Also please note this is not a support forum .
It is possible that your use case doesn’t actually require inheritance and can be written elegantly in idiomatic rust.
You may request a code review in the Rust subreddit , and there is a dedicated subreddit for game development in Rust. Welcome to the community.
abc
September 7, 2014, 1:52pm
5
Sorry I had not noticed that.
system
Closed
March 25, 2019, 8:22am
6
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.