News for hackers. Stuff that matters.
Re:Compile-Time DI vs. Run-Time DI by jcelerier on Tuesday April 30, 2019 @12:38PM (#19789487)
> Isn't it bizarre how software developers have taken runtime DI to such extremes that it was considered a good idea to configure services in XML or YAML -- basically another language, that has to be parsed, can be malformed, etc?

well, then how do you do it ? what do you do if your client / boss tells you "I want to configure the plug-ins & classes availables in the software through some file editing without having to recompile anything" and your codebase is in C++ / Java / Go / D / Rust ...

Re:Compile-Time DI vs. Run-Time DI by JetSpiegel on Tuesday April 30, 2019 @01:25PM (#19789968)
> what do you do if your client / boss tells you "I want to configure the plug-ins & classes availables in the software through some file editing without having to recompile anything" and your codebase is in C++ / Java / Go / D / Rust ...

You compile all the (tested) combinations as static executables and shove them all into the release package.

Re:Compile-Time DI vs. Run-Time DI by stabbles on Tuesday April 30, 2019 @01:49PM (#19790215)
Yes, in that case you probably need to parse a config file.

But you might also encounter DI config files for specific environments, like development where you inject MockMailer, TrivialLogger and InMemoryDatabase instead of RealLifeMailer, CloudLogger and ActualDatabase.