Hacker News new | ask | show | jobs
by IshKebab 1405 days ago
I don't think he is unaware of any of that. His point was that multiple inheritance involves enough fiddly surprising behaviour that it's best avoided - you are better off manually delegating to distinct member variables, then it is clear what is happening even if it is a bit more tedious.

(Btw that's the only way to implement inheritance in Rust, even single inheritance.)

1 comments

> multiple inheritance involves enough fiddly surprising behaviour

In which way? MRO is very well defined.

> manually delegating to distinct member variables

Again, this is composition, which has nothing to do with inheritance. If you need to define a subtype, inheritance is most straightforward.