This came up a while back and it appeared that the metadata just reflected 
whether the var was created with the ^:dynamic annotation. But the meta 
attribute is an output, so to speak; the info flows from the var 
declaration to the meta but not the reverse. Maybe it'll remain like that 
as there's already a solution.

On Saturday, March 1, 2014 7:02:14 AM UTC-8, Эльдар Габдуллин wrote:

> I expected the following to work, but it doesn't:
>
> (defn declare-foo []
>   (intern *ns*
>           (with-meta '*foo* {:dynamic true :private true})
>           "foo"))
>
> Although it creates a var, it is not dynamic. We can mark it 
> dynamic ourselves,
> but it seems that such ability is an implementation detail.
>
> (defn declare-foo []
>   (.setDynamic (intern *ns*
>                        (with-meta '*foo* {:private true})
>                        "foo")))
>
> May be it's a Clojure bug and the first variant is supposed to work?
>
>

-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to