Hi,

On 13 Jun., 19:55, Moritz Ulrich <ulrich.mor...@googlemail.com> wrote:

> 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).

But your idea doesn't improve things, no? You hard-wire the server at
macro expansion time. So using multiple servers doesn't work at all.
At least not easily. I still prefer the double approach. Bind *server*
or pass it as an argument. You can add even another level of
indirection. Make *server* an atom and set it once a startup. Then you
don't even need binding. For local required different server you can
use binding for a bunch off functions, you don't control. Or pass in a
server if do control the code.

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

Reply via email to