News for hackers. Stuff that matters.
Re:Ask HN: What programming feature can't you live without? by lloydjatkinson on Wednesday May 03, 2017 @07:55AM (#14254915)
Composition (Interfaces) / Dependency injection / mocking.

Each one is invaluable on their own, but combined they make for very clean, maintainable, and easily testable software.

I find it hard to take any modern language that isn't capable of these seriously. For example, Rust (from talking to some Rust devs on /r/rust) does not have interfaces only "traits" and this prevents you from from being able to use DI thus limiting your ability to mock in the process.

And by dependency injection, I don't mean the XML bullshit that I see Java developers complaining about a lot.

There are no comments on this comment yet.