Comments by "p11" (@porky1118) on "3 Ways OOP Changed The World" video.

  1. What I dislike about most OO languges: # No way to define simple functions There might be static methods, but they still have to belong to a specific class, which often does not make sense. In such cases, I "misuse" classes as modules, but it's often a lot of boiler plate code in this case (`public static`). # To which object does a method belong? Or I know, it should be a method, but don't know, of which of the objects. There are many posibilities, but none of them seems preferable. As long as I don't need dispatch, functions are often the way to go. Else it's pretty clear unless I need multiple dispatch, which also doesn't exist in most OO langugaes. # Being able to overwrite any method I think, methods should never be able to be overwritten in general. There's one exception: Default methods. Some method of an abstract class, which is explicitly meant to be overwritten. (any virtual method in an abstract class) And there could be empty method definitions, which can be defined in a child class (empty virtual methods). And they can only be overwritten once by an inheriting class. If you need to overwrite something twice, something is wrong with your code. Instead of overwriting methods, I like the idea of methods, which extend the behavior of the parent but without changing it (see method combinations), but most of the time, this is too complicated. In cases, you want to extend behavior multiple times, it's probably the best to add a new virtual methods in child objects. This way it's not allowed to accidently forget to call the parent method, which often seems like boilerplate anyway.
    2