Hacker News new | ask | show | jobs
by fizwhiz 3926 days ago
Your comment is unclear. Are you encouraging people to NOT use DI frameworks, or using them only with constructor-based injection?
1 comments

The latter. DI frameworks are a convenience item, they should probably not have a big effect on the way the code is written. You get most of the benefits of DI just from not new'ing up things within your classes.

The main advantage of keeping the constructors around is that you retain more flexibility in interacting with that bit of code.