4 ms·
I'm still very much pro DI as a concept. I don't think DI itself really causes any problems, the solutions designed to save you from a little bit of boilerplat
by WatchDog 2y ago
I'm still very much pro DI as a concept.
I don't think DI itself really causes any problems, the solutions designed to save you from a little bit of boilerplate code, cause the problems.
- kookamamie 2y agoI mean the original statemement from the perspective that only certain languages/environments (Java, etc.) propose DI as a solution. E.g. in my current language of choice, C++, DI is nowhere to be found.
- WatchDog 2y agoC++ has constructors doesn't it?
- ReleaseCandidat 2y agoAnd higher order functions.
- ReleaseCandidat 2y ago> in my current language of choice, C++, DI is nowhere to be found STL, for example when passing explicit allocators. You can even call any higher order function using dependency injection. And of course there are C++ codebases that look like Java - the pattern book works with C++ too.
- stonemetal12 2y agoAre you pro DI as in "Dependency Injection", or pro DI as in "Dependency Inversion Principle"? DIP is a good way to build software. When injecting dependencies becomes so complex you need a framework or need a separate concept of DI (sans P) then I think something has gone wrong, incidental complexity has won.