I've been investigating how to handle configuration in a Clojure 
application/library, and have discovered two main candidates: dynamics vars 
and argument passing.

The downsides to dynamic vars seem to be: hiddenness, thread safety, and 
more complex tests (binding before each test).

The downside to argument passing is noise in the code (especially when 
you're just passing the config through). Longer and more descriptive names 
for the config (i.e. not "ctx" or "cfg") make this noise even more painful.

Are there any alternatives that I've missed? What is the current best 
practice for handling configuration?

Cheers,
James

-- 
-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to