3 ms·
Yes, OOP binding is more complex than functional polymorphism. But roughly half of the extra complexity on your Python code comes from the fact that OOP classe
by marcosdumay 4y ago
Yes, OOP binding is more complex than functional polymorphism.
But roughly half of the extra complexity on your Python code comes from the fact that OOP classes are closed, while FP traits (often called "classes" too) are open. As a consequence, you must support the OOP functionality defined on many places to get the same amount of freedom.
Python classes are actually open, so if you accept monkey typing, you can expect the functionality always coming from the lhs' class and get a much more obvious and simple code.