3 ms·
There is good and bad OOP, but I think a frequent problem that occurs in _older_ OOP is that when people try to abstract things you end up with functionality in
by whizzter 3y ago
There is good and bad OOP, but I think a frequent problem that occurs in _older_ OOP is that when people try to abstract things you end up with functionality in base-classes that can possibly be overriden in subclasses but it might be complicated for reasons and carries extra data, the control flow going from parent->child->parent->child,etc in unfortunate cases (some of this can probably also be attributed to programmers caring more about memory consumption back in the days OOP was popular, leading to many cludgles).
With a more functional style you often rather make consumers to pass a function with behavior modifying code, the upside is that the specialization is given from the call-site and that the callee can is more explicit about passing out things without needing to care about the specialization context, and often it's easy to compose specializations in this way in one place.