Hacker News new | ask | show | jobs
by rektide 1213 days ago
It's a pretty big assumption to say DI makes code harder to read.

Personally, a decade and a half ago I felt like it was pretty easy to understand what I was working with. I'd hope observability has improved since, that there's been further improvement.

There's a horrible reputation for DI, people with old scars, that seems like there's no escaping from. But my workplaces had a great time using a variety of DI tools, again and again. We got great monorepo code sharing across numerous projects & easy to understand parts. My experience has been great. I want to keep asking, what would make folks reconsider their negative attitude?

2 comments

For me, it would take at least one positive and significant experience.

I would probably need to work on a team where at least some of my teammates had some mastery of the framework, including knowing how to use it effectively in the long term.

Di is great. Di frameworks are usually not.