Yes, you right. Definitely both atom and dynamic is too much, the idea is to set once for the whole section at the very start, given anyway the possibility to change it by bindig when it is necessary...
I guess that i should use only dynamic... but i got some problem changing the var... I should look better at the doc... Il giorno venerdì 25 maggio 2012 01:49:41 UTC-5, Ulises ha scritto: > > > I am unsure about the atom of api-key, in theory i won't need to change > my > > api-key, but idk... You can get a lot of api-key gratis which are a > little > > limited or just one payed api-key that can do everything... > > My point was that once you've declared api-key {:dynamic true} (which > by the way is not necessary if you define your api key as an atom) you > can then either bind it to a different value in a particular thread > with (binding ...) or in a particular context with (with-redef ...)[1] > > This approach works fine when you regularly change your api key > depending on the context, however I'm not entirely sure how things > would work if you want to set your api-key once for an entire session. > > U > > [1] http://clojure.org/vars > -- 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