Hi Marshall,
On Fri, Jul 26, 2013 at 5:39 PM, Marshall Bockrath-Vandegrift < [email protected]> wrote: > Jürgen Hötzel <[email protected]> writes: > > > If a symbol X is interned twice, shouldn't the second Symbol.intern(X) > > return the previous interned symbol object? > > Symbols in Clojure can have metadata, and so can’t have pure value-based > identity. Keywords fill that role instead, which is why keywords can’t > hold metadata, and why `Keyword/intern` *does* act as you had expected > `Symbol/intern` to act. Or at least this is my understanding – I hope > it helps. > All Symbols are immutable. "with-meta" returns a new Symbol: public IObj withMeta(IPersistentMap meta){ return new Symbol(meta, ns, name); } My Question was about the interning. AFAIK interning shoult only return a "new" Symbol, when the Symbol wasn't interned already. Jürgen -- -- 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 unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
