<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Clojure Q&amp;A - Recent questions and answers in Metadata</title>
<link>https://ask.clojure.org/index.php/qa/clojure/metadata</link>
<description></description>
<item>
<title>Answered: Is it valid for metadata to have metadata?</title>
<link>https://ask.clojure.org/index.php/14927/is-it-valid-for-metadata-to-have-metadata?show=14933#a14933</link>
<description>&lt;p&gt;Thanks for the additional info! I do think this is bug, which I've filed at &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojure.atlassian.net/browse/CLJ-2941&quot;&gt;https://clojure.atlassian.net/browse/CLJ-2941&lt;/a&gt; and patch is welcome. &lt;/p&gt;
&lt;p&gt;If you need to sign the contributor agreement or get access to jira, please follow process at &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojure.org/dev/dev#_becoming_a_contributor&quot;&gt;https://clojure.org/dev/dev#_becoming_a_contributor&lt;/a&gt;&lt;/p&gt;
</description>
<category>Metadata</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14927/is-it-valid-for-metadata-to-have-metadata?show=14933#a14933</guid>
<pubDate>Tue, 17 Feb 2026 15:10:58 +0000</pubDate>
</item>
<item>
<title>Metadata on quoted forms</title>
<link>https://ask.clojure.org/index.php/14620/metadata-on-quoted-forms</link>
<description>&lt;p&gt;Reader metadata is attached to IObj forms at read time, but if the form is quoted, then the quote form gets the metadata and the quoted form doesn't get the metadata. This means that to attach metadata to forms, you need to write the slightly awkward quote -&amp;gt; metadata -&amp;gt; form instead of the (imo) more natural metadata-&amp;gt; quote -&amp;gt; form.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;user=&amp;gt; (meta ^:foo '(1 2 3))
{:line 1 :column 1}
user=&amp;gt; (meta '^:foo (1 2 3))
{:lime 1 :column 1 :foo true}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I know that this is because &lt;code&gt;'&lt;/code&gt; is implemented as a &quot;WrappingReader&quot; and so the former is read as &lt;code&gt;^:foo (quote (1 2 3))&lt;/code&gt; but that feels like an implementation detail leaking through. I think it would be helpful/more consistent if quote passed any metadata to IObjs.&lt;/p&gt;
</description>
<category>Metadata</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14620/metadata-on-quoted-forms</guid>
<pubDate>Sun, 06 Jul 2025 15:29:14 +0000</pubDate>
</item>
<item>
<title>Answered: Bind *ns* and require before evaluating namespace metadata</title>
<link>https://ask.clojure.org/index.php/10005/bind-ns-and-require-before-evaluating-namespace-metadata?show=14554#a14554</link>
<description>&lt;p&gt;Regardless of whether this is desirable or not, I don't believe this is currently feasible. The reader reads in each form one at a time, converting auto-namespaced keywords and symbols to fully-qualified keywords and symbols, and then evaluates the whole form. The target namespace alias (&lt;code&gt;tape.mvc&lt;/code&gt;) has to exist before the form &lt;code&gt;::mvc/interceptors&lt;/code&gt; can even be read, which can't happen when the entire &lt;code&gt;(ns)&lt;/code&gt; form will be read together and the aliases don't exist yet.&lt;/p&gt;
</description>
<category>Metadata</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/10005/bind-ns-and-require-before-evaluating-namespace-metadata?show=14554#a14554</guid>
<pubDate>Tue, 20 May 2025 19:51:37 +0000</pubDate>
</item>
<item>
<title>Answered: File and location data on namespaces</title>
<link>https://ask.clojure.org/index.php/14546/file-and-location-data-on-namespaces?show=14548#a14548</link>
<description>&lt;p&gt;Logged as &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojure.atlassian.net/browse/CLJ-2907&quot;&gt;https://clojure.atlassian.net/browse/CLJ-2907&lt;/a&gt; - patch welcome&lt;/p&gt;
</description>
<category>Metadata</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14546/file-and-location-data-on-namespaces?show=14548#a14548</guid>
<pubDate>Fri, 16 May 2025 17:33:26 +0000</pubDate>
</item>
<item>
<title>Answered: A function with metadata is slower than it could be</title>
<link>https://ask.clojure.org/index.php/14438/a-function-with-metadata-is-slower-than-it-could-be?show=14444#a14444</link>
<description>&lt;p&gt;Wouldn't it make more sense to focus on making applyTo faster?&lt;/p&gt;
</description>
<category>Metadata</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14438/a-function-with-metadata-is-slower-than-it-could-be?show=14444#a14444</guid>
<pubDate>Wed, 05 Mar 2025 18:51:01 +0000</pubDate>
</item>
<item>
<title>Answered: Add type hints to `ex-info`</title>
<link>https://ask.clojure.org/index.php/13399/add-type-hints-to-ex-info?show=13504#a13504</link>
<description>&lt;p&gt;Jira ticket &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojure.atlassian.net/browse/CLJ-2815&quot;&gt;https://clojure.atlassian.net/browse/CLJ-2815&lt;/a&gt; has been created to track the issue.&lt;/p&gt;
</description>
<category>Metadata</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/13399/add-type-hints-to-ex-info?show=13504#a13504</guid>
<pubDate>Fri, 01 Dec 2023 19:52:15 +0000</pubDate>
</item>
<item>
<title>Answered: what does ^:once meta applied for anon function mean?</title>
<link>https://ask.clojure.org/index.php/13050/what-does-once-meta-applied-for-anon-function-mean?show=13052#a13052</link>
<description>&lt;p&gt;it promises the compielr that the lambda will only be invoked once, and thus any variables that are captured in the lexical context can be garbage collected.&lt;/p&gt;
&lt;p&gt;This is potentially unsafe if used incorrectly, but in some contexts it's necessary to avoid unnecessarily holding onto unused memory&lt;/p&gt;
&lt;p&gt;This example shows how it works:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;user=&amp;gt; (let [x (Object.)] (def x (^:once fn* [] x)))
#'user/x
user=&amp;gt; (x)
#object[java.lang.Object 0x2189e7a7 &quot;java.lang.Object@2189e7a7&quot;]
user=&amp;gt; (x)
nil
&lt;/code&gt;&lt;/pre&gt;
</description>
<category>Metadata</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/13050/what-does-once-meta-applied-for-anon-function-mean?show=13052#a13052</guid>
<pubDate>Sun, 02 Jul 2023 18:49:22 +0000</pubDate>
</item>
<item>
<title>Answered: strange behavior with `range` and `with-meta`</title>
<link>https://ask.clojure.org/index.php/12148/strange-behavior-with-range-and-with-meta?show=12149#a12149</link>
<description>&lt;p&gt;Logged as &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojure.atlassian.net/browse/CLJ-2721&quot;&gt;https://clojure.atlassian.net/browse/CLJ-2721&lt;/a&gt;, we'll get that in 1.12. Thx!&lt;/p&gt;
</description>
<category>Metadata</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/12148/strange-behavior-with-range-and-with-meta?show=12149#a12149</guid>
<pubDate>Tue, 06 Sep 2022 13:49:33 +0000</pubDate>
</item>
<item>
<title>Answered: which two objects share the same sequence?</title>
<link>https://ask.clojure.org/index.php/10756/which-two-objects-share-the-same-sequence?show=10757#a10757</link>
<description>&lt;p&gt;There is a collision over uses of the word &quot;sequence&quot; referring to distinct things.  A tiny experiment suggests that it means &quot;...so that both objects can share the same tail&quot;:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;clj꞉user꞉&amp;gt; 
(def A (map inc (range)))
#'user/A
clj꞉user꞉&amp;gt; 
(def B (with-meta A {:foo &quot;baz&quot;}))
#'user/B
clj꞉user꞉&amp;gt; 
(identical? A B)
false
clj꞉user꞉&amp;gt; 
(identical? (rest A) (rest B))
true
&lt;/code&gt;&lt;/pre&gt;
</description>
<category>Metadata</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/10756/which-two-objects-share-the-same-sequence?show=10757#a10757</guid>
<pubDate>Sat, 10 Jul 2021 01:55:57 +0000</pubDate>
</item>
<item>
<title>Answered: Enhance multimethods metadata</title>
<link>https://ask.clojure.org/index.php/2371/enhance-multimethods-metadata?show=2528#a2528</link>
<description>Reference: &lt;a href=&quot;https://clojure.atlassian.net/browse/CLJ-1522&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;https://clojure.atlassian.net/browse/CLJ-1522&lt;/a&gt; (reported by bozhidar)</description>
<category>Metadata</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/2371/enhance-multimethods-metadata?show=2528#a2528</guid>
<pubDate>Wed, 26 Jun 2019 12:00:00 +0000</pubDate>
</item>
</channel>
</rss>