3 ms·
> But! None of that cruft means that the DI pattern is bad. It's just that people have done very bad things in it's name. DI adds complexity to the code just b
by marcosdumay 6y ago
> But! None of that cruft means that the DI pattern is bad. It's just that people have done very bad things in it's name.
DI adds complexity to the code just by itself. The best ways to implement it are the ones that add as little complexity as possible, but they are still adding complexity.
So, I wouldn't call it a "bad pattern", but it's not something that should be carelessly decided. The best DI is still no DI, you go for the second best only when you can't use the best.