Sorry for delay, I had difficulties with Google Groups ... posted several
times.
Thanks about the hint about *with-local-vars*, Marc
--
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 t
>> .setDynamic on the var.
Works fine! See also
http://blog.zolotko.me/2012/06/making-variable-dynamic-in-clojure.html.
Should be documented ...
Great help, thanks, Marc
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send e
.setDynamic on the var.
This is implementation detail though...
Sent from phone. Please excuse brevity.
On 7 Sep 2012 13:04, "Marc Dzaebel" wrote:
> (intern *ns* 's) creates a non dynamic variable, but how do I achieve (def
> ^:dynamic s) programmatically?
>
> Thanks, Marc
>
> --
> You received
(intern *ns* 's) creates a non dynamic variable, but how do I achieve (def
^:dynamic s) programmatically?
Thanks, Marc
--
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
Beware however, that interning vars programmatically is not recommended. If
you need fresh vars during runtime, use with-local-vars, which also
produces dynamic vars.
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to
2012/9/4 mdzaebel
> (doseq [s '(a b c)] (intern *ns* s 0)) creates non-dynamic var's.
>
> However, how could I produce *dynamic* var's. I tried with-meta but
> failed. In other words, what does (def ^:dynamic a) internally do?
>
You can use clojure.lang.Var.setDynamic
https://github.com/clojure/
(doseq [s '(a b c)] (intern *ns* s 0)) creates non-dynamic var's.
However, how could I produce *dynamic* var's. I tried with-meta but failed.
In other words, what does (def ^:dynamic a) internally do?
*Thanks in advance, Marc*
--
You received this message because you are subscribed to the Goog