So I've built a file/namespace with several functions.  There are
several globals defined at the top of the file (for example,
*gravity*) which many of the functions refer to.  I made them globals
precisely because it would have been a pain to thread them through
every single function that uses them.

Now, I need to maintain two versions of this module.  For example,
let's say I want one module where the *gravity* constant is defined to
be 1.0, and one where it is defined as 2.0.

I know how to do this in other languages, especially OO ones, but I'm
scratching my head trying to think of a clean solution in Clojure for
this seemingly simple problem.  I've tried various namespace trickery
with vars and bindings, but I haven't found a workable solution yet.
What am I missing?  Thanks.

--~--~---------~--~----~------------~-------~--~----~
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
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