3 ms·
> The code does not demonstrate encapsulation because the data type has not been decoupled from the implementation. Not all code has to be applicable to more t
by adwn 13y ago
> The code does not demonstrate encapsulation because the data type has not been decoupled from the implementation.
Not all code has to be applicable to more than one use case. What you're suggesting is premature generalization, which is just as bad as premature optimization. One might argue that p.g. is a kind of p.o. with the metric to be optimized being abstraction.