This was in the original branch of the clojure-couchdb-project. I forked it and rewrote all functions to take an argument instead of using *server*.
This annoyed me, because it was complicated to use multiple servers with one codebase (binding is annoying in multi-thread-applications). On Sun, Jun 13, 2010 at 7:40 PM, Meikel Brandmeyer <m...@kotka.de> wrote: > Hi, > > Am 13.06.2010 um 18:31 schrieb Moritz Ulrich: > >> Thanks for your answers. > > Wouldn't it be more appropriate to have a *server* Var, which is allowed to > be rebound by the user? The function can still use optional arguments to > configure the server directly in a call. > > (declare *server*) > > (defn do-query > [... & {:keys [server] :or {server *server*}] > ...) > > This looks more comfortable and clean than doing Var-Voodoo. > > Sincerely > Meikel > > -- > 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 -- Moritz Ulrich Programmer, Student, Almost normal Guy http://www.google.com/profiles/ulrich.moritz -- 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