Constructor injection should work as expected in any environment compatible and compliant with the ES6 and module specs. Or any functional environment with a module system.

Imho, it is the simplest and easiest to understand solution as well, it only removes code and adds two parameters. Thus expressing exactly what part is dependent on A and B in a parameterized reusable way, without any static cyclic dependencies. And without any complexity in the module initialization / resolution / evaluation.

Just reading the code once allows me to think about the entire flow, without keeping more than three concept in mind at once. Essentially allowing me to predict the entire execution of the program, without even running it.

_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to