top | item 41565979

(no title)

Avi-D-coder | 1 year ago

Yes, the dependency inversion principle is not a commonly held principle in FP or imperative paradigms.

discuss

order

asimpletune|1 year ago

Wow when I read this comment I did a double take and had to go to Wikipedia… then I realized dependency inversion is not the same thing as inversion of control and things made much more sense.

I guess part of the confusion came from how dependency injection is a form of inversion of control… the words are all very similar to dependency inversion.

aswerty|1 year ago

I think your identification of that distinction is entirely too generous. Typically the derision of dependency inversion extends to inversion of control since they are cut from the same cloth. One just focuses on what is being inverted and the other the process of inversion.

tcfhgj|1 year ago

So passing functions to functions instead of explicitly calling them is what exactly then?

Avi-D-coder|1 year ago

Higher order functions can be used for dependency injection.

Dependency injection and the Dependency inversion principle are not one and the same.

The principle makes a claim, that inversion is a good onto itself.

Injection is a tool not a claim.

ramchip|1 year ago

Dependency injection