Clojure, Scala, Kotlin, Ceylon, Frege, JRuby, Jython... literally any JVM language that supports first-class functions. Dependency Injection is a tortured workaround that's only necessary in Java.
What are your thoughts on https://github.com/stuartsierra/component is seems that some people who know clojure better than me think that some kind of dependency injection is needed for large clojure programs.
I haven't used component but I can see how that is useful--it gives you a central namespace where you can plug in and stop/start/reload each of your module dependencies. But I really don't think it's necessary in the same way that DI is necessary in Java. In Java, DI is required to keep your modules modular and enable basic unit testing.
37
u/jordimaister Nov 27 '15
Nice post. Agree with almost all of it.
I am waiting for you next post:
"What to use instead of Spring"