3 ms·
> They kind of solve the same problem no they don't. That's a fundamental mistake to say that. DI is about inversion of control , modules don't do that.
by aikah 11y ago
> They kind of solve the same problem
no they don't. That's a fundamental mistake to say that. DI is about inversion of control , modules don't do that.
- troels 11y agoIoC is the way that DI solves the problem. But the problem is dependency management - and there are other ways around that.
- stupidcar 11y agoThe difference is that modules systems specify statically resolved dependencies between code files. DI and IoC specify dynamically resolved dependencies between instances of objects. They are both useful, but they both solve different problems.