> The stupidest reason I keep hearing over and over again is DI makes it possible to change an implementation at runtime.
No, DI is about setting up your application at start time, not at runtime.
Configuration frameworks only cover a tiny fraction of this problem (basically by forcing you to pass a giant "Config" object everywhere). DI generalizes this process by making the information passed around more granular.
No, DI is about setting up your application at start time, not at runtime.
Configuration frameworks only cover a tiny fraction of this problem (basically by forcing you to pass a giant "Config" object everywhere). DI generalizes this process by making the information passed around more granular.