2 ms·
Honestly if your criticism to code reuse is all about DRY, and you equate code reuse with abstraction, then it should not be taken seriously. Abstraction, code
by nsonha 5y ago
Honestly if your criticism to code reuse is all about DRY, and you equate code reuse with abstraction, then it should not be taken seriously.
Abstraction, code reuse and DRY are 3 different things. Abstraction is control, when you want the client code to conform to a pattern, so that it won't break your system. Code reuse can be either about convenience or control, can be abstraction related or not. For example when you reuse a function that perform a critical business logic, you don't do it to conform to an abstraction, nor to save time typing the function again. You do it because you want a single source of truth for that bit of logic.
Lastly DRY is purely about convenience.