Is overriding dependency prodivers considered bad practice?

Victor Porton porton at narod.ru
Sun Feb 24 10:36:40 UTC 2019


 From https://stackoverflow.com/q/54847333/856090 :

I am reimplementing something like Python [Dependency 
Injector][1] in D programming language. I want to build a pure 
dependency injection framework for D.

Is [overriding of providers][2] considered bad practice? It seems 
that overriding of providers is clearly a nonlocal dependency and 
nonlocal dependencies are usually considered a bad practice by 
OOP theoretics.

So should I or should I not implement overriding of providers in 
my pure dependency injection framework for D?

   [1]: http://python-dependency-injector.ets-labs.org/
   [2]: 
http://python-dependency-injector.ets-labs.org/providers/overriding.html


More information about the Digitalmars-d mailing list