News for hackers. Stuff that matters.
Re:Better Java – Resources for Writing Modern Java by kilink on Saturday September 19, 2015 @07:39PM (#10245951)
> First: constructor calling is not readable because Java misses named parameters. It's fine when there are 2-3 dependencies, but not more.

If you have more than 2-3 dependencies, it might be time to refactor things, as your class may be doing too many things.

> Second: circular dependency is not possible.

Circular dependencies are possible with constructor injection when using a DI framework (e.g., using a Provider in Guice [1], or the equivalent in Dagger).

[1] https://github.com/google/guice/wiki/CyclicDependencies

There are no comments on this comment yet.