I would ask why you would want to do dependency injection? If it is to swap out functions for testing, just use 'with-redefs'. I have personally found it (DI) completely unnecessary...
On Wed, Mar 28, 2012 at 1:13 PM, Chris McBride <cmm7...@gmail.com> wrote: > I was wondering how dependency injection is done in Clojure since functions > live in static namespaces. It seems like this could be achieved by having a > macro that can use runtime information to determine the mapping between a > namespace and its implementation. Does this make sense? Is there a better > way to dependency injection in Clojure? > > -- > You received this message because you are subscribed to the Google > Groups "Clojure" group. > To post to this group, send email to clojure@googlegroups.com > Note that posts from new members are moderated - please be patient with your > first post. > To unsubscribe from this group, send email to > clojure+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/clojure?hl=en -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en