Re:Cyclic dependencies are evil (2013)
by stingraycharles on Saturday January 30, 2021 @06:08PM
(#25973960)
I have to say that in my whole career of doing Java / Clojure, Google’s SDK are one of the worst in terms of dependency hell. It’s incredibly unpleasant to work with, lots of breaking incompatibilities with libraries, etcetera.
I may sound very snarky, but it really feels like an over engineered mess and I suspect the reason they need all these dependency tricks is the fact that it’s over engineered, not necessarily that the problem they’re solving is so unique that they need circular dependencies.
Re:Cyclic dependencies are evil (2013)
by username90 on Saturday January 30, 2021 @06:41PM
(#25974209)
You never truly need circular dependencies, however many times letting functions at the same abstraction level call each other greatly simplifies code.
If you've working with Java at Google (Guice) makes you learn to hate hiding circular dependencies behind dependency injection, since your binary gets injected by some huge tree of thousands of dependencies all that can create errors or interfere with each other. And without static checking trying to reason and fix those issues becomes really hard.
I strongly prefer using the languages actual type system to create circular dependencies that you can inspect using well known tools over that any day, better have a problem you can see than hide the same problem to satisfy some tools requirement.