Re:Dependency injection in Go with Uber-go/fx
by lr4444lr on Sunday February 27, 2022 @10:06AM
(#30489074)
Just come out and say it: DI is an anti-pattern. No implementation of it that I'd ever use was doable without a good config file schema, and at that point I have to ask: why not just have a declarative build system in the first place as the modern generation of Devops tools does? DI just burdens and litters code unnecessarily with awareness of build files.
[ Parent
| on HN ]
Re:Dependency injection in Go with Uber-go/fx
by isbvhodnvemrwvn on Sunday February 27, 2022 @10:15AM
(#30489146)
You, as many people here, are again mistaking dependency injection with dependency injection containers. You don't need containers for dependency injection, most codebases can just wire everything by hand without any problem.