5 ms·
I was thinking the same thing. It has nothing to do with callbacks. > fully resolving circular dependencies is equivalent to solving the halting problem, IIRC
by markuz 12y ago
I was thinking the same thing.
It has nothing to do with callbacks.
> fully resolving circular dependencies is equivalent to solving the halting problem, IIRC.
I don't think so. Any good dependency injection framework would detect this kind of circular dependency.
- groby_b 12y agoOf logger and DB, certainly. The coupling introduced via locks is harder to detect. But most importantly, circular dependency between components might be OK in a path-dependent way - that's what I meant by fully resolving it. Just analyzing the dependency graph of injected components is indeed just a topological sort.