Open leighmcculloch opened 4 weeks ago
Rust does not support inheritance, and the structure of the existing contract macros make it difficult to generate a contract from a partial representation extending a trait.
The main challenge of supporting extensibility is similar to the main challenge to support type reusability:
Both issues require coming up with a way to selectively export information (types, functions) that is defined in other crates. This is not trivial because the export information is generated as compile type into static variables that rustc destines for custom sections in the wasm.
We could explore ways to support extending an existing contract with new functionality.
A couple times people have asked for the ability to take an existing contract, or a template, and extend the contract with custom functionality.
Solidity supports this through inheritance.