4 ms·
You do not need interfaces for dependency injection and it can also be done without global mutable state. This Clojure library is doing so beautifully with imm
by jeremiep 9y ago
You do not need interfaces for dependency injection and it can also be done without global mutable state.
This Clojure library is doing so beautifully with immutability: https://github.com/stuartsierra/component https://github.com/stuartsierra/component
- klibertp 9y ago> You do not need interfaces for dependency injection Yet each component is supposed to implement component/Lifecycle protocol... in other words, an interface. And component is actually awful in practice. It may look neat in theory, but it's too simple and results in a mess not much better than it would be without it.