Hacker News new | ask | show | jobs
by deepsun 982 days ago
I like middle-ground dependency injection: do it, but only during build time.

Dagger library does that (generates all the glue code during pre-compile phase), so all the dependency-injection already happened before runtime. Also, JVM has an easier time reasoning/optimizing the code.

But I also found that writing the glue code by hand, same way as Dagger would do, is not that hard IMO.