Hacker News new | ask | show | jobs
by sverhagen 390 days ago
I think so.

Also, what I think is also important to differentiate between: dependency injection, and programming against interfaces.

Interfaces are good, and there was a while where infant DI and mocking frameworks didn't work without them, so that folks created an interface for every class and only ever used the interface in the dependent classes. But the need for interfaces has been heavily misunderstood and overstated. Most dependencies can just be classes, and that means you can in fact click right into the implementation, not because the IDE understands DI, but because it understands the language (Java).

Don't hate DI for the gotten-out-of-control "programming against interfaces".