
On Sun, Apr 10, 2022 at 03:50:48PM -0000, malmiteria wrote:
Steven D'Aprano writes:
The order in which parents are placed in case of multiple inheritance is far from being that obviously assymetrical, and the syntax does not hint it is, quite less than inheritance syntax.
Do you think that the order of arguments in func(a, b) doesn't matter?
"class A(B)" feels very different from "class B(A)" but "class A(B,C)" doesn't feel so obviously different from "class A(C,B)" Despite it mattering the exact same amount.
That's an UX problem, essentially. It is not so obvious the order matter in MI.
No, it is an education problem. Programming is a complex task that requires both skill and knowledge that must be learned, and that includes the fact that the order of arguments to functions, the order of operands to some operators (subtraction, division, power) and the order of superclasses do matter. One of the reasons why this discussion isn't going anywhere is that we agree that MI is difficult, but your "solution" to that is to make super() even more complex, with even more to learn, so that people can use MI in even more cases of problems which are better solved with another technique. It is like you only have one tool in your toolbox, super, and you want to solve every problem with it. "This screwdriver is not very good at hammering nails, so we should give it a much harder, heavier handle, so we can hammer nails better." -- Steve