I have a clojure application that need some configuration variable, mainly string but also stuff to evaluate.
I could just declare every single variable with something like:
(def config-db "URI_DB"))
(def config-time (hours 1))
But I thought that might be a good idea (I am not very sure) write a macro to do that, something that will looks like this:
(make-config
config-db "URI_DB"
config-time (hours 1))
(Or I can put the names inside a vector to looks more like a let statement)
But I am getting problem when I put more than one couple, I did this:
(defmacro define-config
[name definition]
`(def ~name ~definition))
But I have really no glue to how expand this in something more useful...
Any suggestions or ideas ?
(def config {:db "URI_DB" :time (hours 1)})- eyelidlessness