Comment

Comment by procrastitron

Dependency injection frameworks are a horrible idea.

They optimize for the wrong thing; making code easier to write but harder to read and edit.

Writing code is a one time cost whereas reading and editing it is an ongoing effort, so dependency injection frameworks are optimizing for the uncommon case at the expense of the common case.

Compile-time dependency injection frameworks are a big improvement over runtime dependency injection frameworks because you can at least read the generated code, but they are still a lot worse than manual dependency injection when it comes to editing code.

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton