The issue here is that the documentation for intern says that it:

> Finds or creates a var named by the symbol name in the namespace
> ns (which can be a symbol or a namespace), setting its root binding
> to val if supplied. The namespace must exist. The var will adopt any
> metadata from the name symbol.  Returns the var.


It seems reasonable to me that intern should respect the metadata
being copied when it does the "create".



On Thu, Jan 3, 2013 at 1:12 PM, Timothy Baldridge <[email protected]>wrote:

> There's about 3-4 CLJ tickets related to this. The issue is that  :dynamic
> is only read once: when the var is created. If you need to change a var to
> be dynamic, you can set it manually with .setDynamic.
>
> Personally I think it's simply an artifact of how defs are created, and
> it's never been enough of a pain to anyone to suggest a better solution.
>
> What's being asked for is some sort of trigger. When :dynamic is set in
> the metadata call setDynamic. This seems like a bad idea to me.
>
> Timothy Baldrige
>
>
> On Thu, Jan 3, 2013 at 10:44 AM, Brian Marick <[email protected]> wrote:
>
>> Why does this:
>>
>>         (def ^{:dynamic true} bar 33)
>>
>> … work to create a dynamic var, but this:
>>
>>         (intern *ns* (with-meta 'foo {:dynamic true}) 33)
>>
>> … doesn't? (Looking more for the justification than mechanics.)
>>
>> --------
>> Occasional consulting on programming technique
>> Contract programming in Ruby and Clojure
>> Latest book: /Functional Programming for the Object-Oriented Programmer/
>> https://leanpub.com/fp-oo
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Clojure" group.
>> To post to this group, send email to [email protected]
>> Note that posts from new members are moderated - please be patient with
>> your first post.
>> To unsubscribe from this group, send email to
>> [email protected]
>> For more options, visit this group at
>> http://groups.google.com/group/clojure?hl=en
>>
>
>
>
> --
> “One of the main causes of the fall of the Roman Empire was that–lacking
> zero–they had no way to indicate successful termination of their C
> programs.”
> (Robert Firth)
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to [email protected]
> Note that posts from new members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> [email protected]
> 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 post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to