3 ms·
Yeah it doesn't make any sense, the whole point of DI is to work around Java's static type system to enable mocking for testing, which is a problem you don't ha
by jseban 5y ago
Yeah it doesn't make any sense, the whole point of DI is to work around Java's static type system to enable mocking for testing, which is a problem you don't have outside of static typing.
But the "why" around these design patterns have been long lost, and people will argue to death that the patterns should always be used in every language/runtime and come up with ever more vague and circular reasons until you can't argue against it.