3 ms·
Dependency injection does not decrease coupling, it hides it.
by Hermel 11y ago
Dependency injection does not decrease coupling, it hides it.
- zamalek 11y agoWell-said.
- dustingetz 11y agoWriting code against IList instead of ArrayList, or IDatabase instead of PostgresDatabase unambiguously decreases coupling.
- Hermel 11y agoNot if you explicitely configure the IList to be an instance of ArrayList and expect it to behave like an ArrayList. In that case, just taking an ArrayList is the more honest and more readable option.