News for hackers. Stuff that matters.
Re:Better Java – Resources for Writing Modern Java by lmm on Sunday September 20, 2015 @03:38AM (#10246849)
I think people use DI just because Java constructor syntax is so incredibly verbose:

    public class MyClass {
      @Inject private String foo;
    }
versus

    public class MyClass {
      private String foo;

      @Inject public MyClass(String foo) {
        this.foo = foo;
      }
    }

There are no comments on this comment yet.