On Fri, Apr 27, 2012 at 4:14 AM, Wolodja Wentland <babi...@gmail.com> wrote: > Could you elaborate on that please? I see that dynamic variables are used > quite > often to give the user the ability to configure/change the behaviour of a > library. That approach is often coupled with a macro that changes the bindings > of dynamic variables.
A better approach is to provide an API where the "changes" can be passed in as function arguments. Dynamic variables smack of imperative programming to me... When I asked Clojure/core to review c.j.jdbc in the context of a potential future 1.0.0 release, the use of dynamic variables was one of the issues that came up. The current variables will probably remain for backward compatibility but a new API or an extension to the current API will be added that provides a more functional style without requiring dynamic variables - and the existing code rewritten in terms of that new API. Hope that clarifies? -- Sean A Corfield -- (904) 302-SEAN An Architect's View -- http://corfield.org/ World Singles, LLC. -- http://worldsingles.com/ "Perfection is the enemy of the good." -- Gustave Flaubert, French realist novelist (1821-1880) -- 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