3 ms·
I agree with OOP not being needed at all, but I don't agree on this being an alternative to dependency injection. However you structure it, there will always b
by adlpz 4y ago
I agree with OOP not being needed at all, but I don't agree on this being an alternative to dependency injection.
However you structure it, there will always be "glue code" that ties the nice inmutable code with the outside-interacting bits, and if you want to unit test those, dependency injection (with functions or state, not classes or instances) is still the way to go.
- mrloba 4y agoTrue, but there might not be a big need for unit testing the glue code. By its very name it doesn't contain much logic to test. Integration tests are more valuable in this case.