|
|
|
|
|
by Aeolun
110 days ago
|
|
When applied without thinking about why. Yes. Except dependency injection. I really can’t imagine why you’d ever not use that. I suppose it’s possible to overuse, but you’d still have better code than without. Certainly more testable code. |
|
With direct dependencies, if you are trying to understand some code that calls some function and what it does exactly isn't completely obvious, you can press a button to go to it, understand it, and come back.
With dependency injection it depends on what is going to be inserted during runtime, so you can't.