3 ms·
Sure, in many situations, but I guess if you need to setup things have have dependencies (init A then init B then init C) this will help.
by pandapower2 7y ago
Sure, in many situations, but I guess if you need to setup things have have dependencies (init A then init B then init C) this will help.
- dvlsg 7y agoHow so? I'm not seeing the benefit over exporting A, B, and C as functions, and then putting them together in another spot (like a composite root for pure DI, or an IoC container, etc). Is the argument for top-level await that you don't need the other spot? Because I feel like you still do - except now it's implicitly inside not only A, but likely B and C as well to some extent. And in a very inflexible way.