11 ms·
This is not really related to the problems that the article is talking about. Rust doesn't have implementation inheritance at all, single or multiple, and "diam
by ameliaquining 2y ago
This is not really related to the problems that the article is talking about. Rust doesn't have implementation inheritance at all, single or multiple, and "diamond impls" are prevented by the orphan rule.
A type implementing multiple traits is fine and normal, as is a type bound that requires type parameters to implement multiple traits; none of this poses any "diamond inheritance" type issues or other conceptual problems. It's only if you want to do dynamic dispatch in this situation that there are problems, because dynamic dispatch requires vtables and it's not clear how vtables for multiple traits would work; all known design proposals have serious drawbacks.