Hacker News new | past | comments | ask | show | jobs | submit login

> 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.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: