|
|
|
|
|
by nathanjames
3694 days ago
|
|
Managing large complex applications is always a major pain. There is no shortcut, no ideal solution. For all of its imperfections, class-based OOP is the best tool we have today to aid in this onerous task. The popularity of class-based OOP is undeniable. People understand that there is no perfect solution. What would you use in its stead? |
|
There is an inverse approach, that abstracts state mutations instead of data itself. Which means no more shared mutations, no more side-effects, no more breaking context of mutations, no more uncontrolled mutations, everything is in exact order it is supposed to be used, everything is easy to understand and easy to cover with tests, etc. And it's just as flexible in Javascript, since it supports higher-order programming, but doesn't lead to nearly as much accidental complexity. However, it's not popular and not taught at schools, like OOP.