> Back to my question: Am I trying to do Java in Clojure? Is there a more > Lisp-y way to do this?
You can hide the types so your client code is more lispy: (defn load-page [prov] (.loadPage prov)) ;;test (def mp (make-mock-provider)) ... (load-page mp) ;;production (def prov (make-provider)) ... (load-page prov) Depending on your app the provider could be a singleton and need not be passed to each function. Another option is multimethods, in which case you'd be using mock functions with an argument that would indicate which version to dispatch to. As for the repl, I think it works just as well for bottom-up and top- down development. I use it for both all the time and to avoid throw- away tests I write them top-down, black-box for only what's visible to client/interop code first, then move down the layers as the code is more mature and stable. I'm not really into TDD but I depend on a test suite as complete as I can get it. -- 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