Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

IoC (not just interfaces, not just DI) should avoid this.

Inject me an object that gets people objects that meet an interface (ok might need to be async) and you can switch out how that is done later.

But it is more boilerplate



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

Search: