4 ms·
> The idea that one class changing won’t change others is a pipe dream Reality is never black and white but that's a good principle for good software design an
by mytailorisrich 3y ago
> The idea that one class changing won’t change others is a pipe dream
Reality is never black and white but that's a good principle for good software design and worth at least aiming for.
If anything that has been adopted and generalised in microservices, etc. because encapsulation, modularity, design by contract all hinge of this same idea, which is powerful and useful.
That's why when discussing any "principles" the important is to get the core idea behind them instead of sticking to the letter and discarding them as useless.
- hajile 3y agoEncapsulation is extremely important and pairs with single responsibility, but that’s completely orthogonal to OOP. Once you are solidly in the composition camp, functions are immediately superior. They tend to be naturally single purpose and have mathematical rules that make them easy to compose. Most function-heavy languages also adopted modules which provide a better, less-leaky abstraction too and that’s without getting into all the other advantages in the type system or better syntactic ergonomics from dropping all the OOP baggage.