<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Clojure Q&amp;A - Recent activity in Metadata</title>
<link>https://ask.clojure.org/index.php/activity/clojure/metadata</link>
<description></description>
<item>
<title>Commented: 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=14936#c14936</link>
<description>Thanks for logging this – I've left a comment on that ticket with a patch and detailed the approach/patch summary there too. I should have a signed CA on file since I've contributed to ClojureScript and tools.reader in the past.</description>
<category>Metadata</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14927/is-it-valid-for-metadata-to-have-metadata?show=14936#c14936</guid>
<pubDate>Wed, 18 Feb 2026 22:01:59 +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>Commented: File and location data on namespaces</title>
<link>https://ask.clojure.org/index.php/14546/file-and-location-data-on-namespaces?show=14553#c14553</link>
<description>Patch submitted.</description>
<category>Metadata</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14546/file-and-location-data-on-namespaces?show=14553#c14553</guid>
<pubDate>Tue, 20 May 2025 19:16:47 +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>Closed: strange behavior with `range` and `with-meta`</title>
<link>https://ask.clojure.org/index.php/12148/strange-behavior-with-range-and-with-meta?show=12148#q12148</link>
<description>&lt;p&gt;from slack: &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojurians.slack.com/archives/C03S1KBA2/p1662437976861689&quot;&gt;https://clojurians.slack.com/archives/C03S1KBA2/p1662437976861689&lt;/a&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(range 0 5 1.0) ;=&amp;gt; (0 1.0 2.0 3.0 4.0)
(with-meta (range 0 5 1.0) {}) ;=&amp;gt; (5)

user=&amp;gt; (def x (range 0 5 1.0))
#'user/x
user=&amp;gt; x
(0 1.0 2.0 3.0 4.0)
user=&amp;gt; (with-meta x {})
(5 1.0 2.0 3.0 4.0)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I noticed that it looks like there might be some out-of-order argument called&lt;/p&gt;
&lt;p&gt;the with-meta call in Range.java:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;public Obj withMeta(IPersistentMap meta){
	if(meta == _meta)
		return this;
	return new Range(meta, end, start, step, boundsCheck, _chunk, _chunkNext);
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;and that constructor has the end and start swapped:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;private Range(IPersistentMap meta, Object start, Object end, Object step, BoundsCheck boundsCheck, IChunk chunk, ISeq chunkNext){
&lt;/code&gt;&lt;/pre&gt;
</description>
<category>Metadata</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/12148/strange-behavior-with-range-and-with-meta?show=12148#q12148</guid>
<pubDate>Wed, 05 Jun 2024 18:57:51 +0000</pubDate>
</item>
<item>
<title>Answer selected: 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 20:17:15 +0000</pubDate>
</item>
<item>
<title>Answer selected: 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>Thu, 06 Jul 2023 12:05:14 +0000</pubDate>
</item>
<item>
<title>Commented: which two objects share the same sequence?</title>
<link>https://ask.clojure.org/index.php/10756/which-two-objects-share-the-same-sequence?show=10775#c10775</link>
<description>Clojure web site issues/prs should be filed at &lt;a href=&quot;https://github.com/clojure/clojure-site/issues&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;https://github.com/clojure/clojure-site/issues&lt;/a&gt;</description>
<category>Metadata</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/10756/which-two-objects-share-the-same-sequence?show=10775#c10775</guid>
<pubDate>Tue, 13 Jul 2021 13:47:10 +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>