<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Clojure Q&amp;A - Recent questions and answers in Clojure</title>
<link>https://ask.clojure.org/index.php/qa/clojure</link>
<description></description>
<item>
<title>require yields confusing &quot;namespace ... not found after loading ...&quot; error if masked by empty test file</title>
<link>https://ask.clojure.org/index.php/15173/require-yields-confusing-namespace-found-after-loading-masked</link>
<description>&lt;p&gt;My home.clj was requring chess.llm, neither file had compilation issues, so I found this error below very strange and I couldn't figure it out. &lt;/p&gt;
&lt;pre&gt;&lt;code&gt;user=&amp;gt; (require 'chess.routes.home :reload)                                                                    
2026-07-10 22:09:37,296 [nREPL-session-cedf8a12-a034-475d-a72c-7683c52bca15]
Syntax error compiling at (chess/routes/home.clj:1:1).
namespace 'chess.llm' not found after loading '/chess/llm' 
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I even tried asking AI for help with troubleshooting but it went down the wrong paths looking for circular dependencies. It wasn't until I copied llm.clj to a different file named caca.clj while only updating the ns declaration &quot;chess.llm =&amp;gt; chess.caca&quot; and corresponding requires in my home.clj, that everything loaded correctly.&lt;/p&gt;
&lt;p&gt;It turns out that I had an empty test file test/chess/llm.clj that was somehow messing up the compilation, and removing this empty test file file, or adding a proper ns declaration, solved the issue.&lt;/p&gt;
&lt;p&gt;I'm reporting this because it would help the next Clojure developer if the error message were more indicative of the bad test file, perhaps by including the full file path.&lt;/p&gt;
&lt;p&gt;Here's the AI-generated explanation of this report:&lt;/p&gt;
&lt;h4&gt;Title&lt;/h4&gt;
&lt;p&gt;&lt;code&gt;require&lt;/code&gt; yields confusing &quot;namespace not found after loading&quot; error if masked by empty file earlier in classpath&lt;/p&gt;
&lt;h4&gt;Environment&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Clojure Version:&lt;/strong&gt; 1.11+ / 1.12&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Build Tool:&lt;/strong&gt; Leiningen / Clojure CLI&lt;/li&gt;
&lt;/ul&gt;
&lt;h4&gt;Description&lt;/h4&gt;
&lt;p&gt;When attempting to &lt;code&gt;require&lt;/code&gt; a valid Clojure namespace, if a completely empty &lt;code&gt;.clj&lt;/code&gt; file with the exact same relative file path exists earlier in the classpath sequence (for example, in &lt;code&gt;test/&lt;/code&gt; when &lt;code&gt;test/&lt;/code&gt; precedes &lt;code&gt;src/&lt;/code&gt; in the active profile), Clojure throws a misleading error. &lt;/p&gt;
&lt;p&gt;The compiler successfully locates and loads the empty file, but because the file lacks an &lt;code&gt;(ns ...)&lt;/code&gt; declaration, it fails to find the registered namespace in memory. This effectively masks the actual, working source file further down the classpath, resulting in an error message that mistakenly implies the namespace naming is incorrect, rather than indicating a classpath prioritization issue.&lt;/p&gt;
&lt;h4&gt;Steps to Reproduce&lt;/h4&gt;
&lt;ol&gt;
&lt;li&gt;Create a project layout where &lt;code&gt;test/&lt;/code&gt; takes priority over &lt;code&gt;src/&lt;/code&gt; on the classpath.&lt;/li&gt;
&lt;li&gt;Create a valid file at &lt;code&gt;src/chess/llm.clj&lt;/code&gt; containing:&lt;br&gt;
&lt;code&gt;`&lt;/code&gt;clojure&lt;br&gt;
(ns chess.llm)&lt;br&gt;
(defn call-llm [] :ok)&lt;br&gt;
&lt;code&gt;`&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Create an empty file at &lt;code&gt;test/chess/llm.clj&lt;/code&gt; (size 0 bytes, absolutely no content).&lt;/li&gt;
&lt;li&gt;Launch a REPL and evaluate: &lt;code&gt;(require 'chess.llm)&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h4&gt;Expected Behavior&lt;/h4&gt;
&lt;p&gt;The compiler should either:&lt;br&gt;
1. Skip empty files on the classpath and continue searching subsequent paths for a matching file containing a valid &lt;code&gt;ns&lt;/code&gt; form.&lt;br&gt;
2. Throw a more descriptive lifecycle error indicating &lt;em&gt;which exact file path&lt;/em&gt; was targeted (e.g., &lt;code&gt;namespace 'chess.llm' not found after loading empty file: test/chess/llm.clj&lt;/code&gt;).&lt;/p&gt;
&lt;h4&gt;Actual Behavior&lt;/h4&gt;
&lt;p&gt;The execution fails completely with a vague stack trace:&lt;br&gt;
&lt;code&gt;`&lt;/code&gt;clojure&lt;br&gt;
Caused by: java.lang.Exception: namespace 'chess.llm' not found after loading '/chess/llm'&lt;br&gt;
&lt;code&gt;`&lt;/code&gt;&lt;/p&gt;
</description>
<category>Clojure</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/15173/require-yields-confusing-namespace-found-after-loading-masked</guid>
<pubDate>Sat, 11 Jul 2026 02:54:34 +0000</pubDate>
</item>
<item>
<title>Answered: Additional handling for `&amp;` symbol in map destructuring for :keys/:syms/:strs could be a breaking change.</title>
<link>https://ask.clojure.org/index.php/15171/additional-handling-symbol-destructuring-breaking-change?show=15172#a15172</link>
<description>&lt;p&gt;Yes, the intent here is to carve this out of being allowed so it is available for syntax purposes in destructuring. We did a fair amount of searching and do not see this being used anywhere. &lt;/p&gt;
&lt;p&gt;We've updated the reference page at &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojure.org/reference/reader#_symbols&quot;&gt;https://clojure.org/reference/reader#_symbols&lt;/a&gt; to explicitly note this.&lt;/p&gt;
</description>
<category>Syntax and reader</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/15171/additional-handling-symbol-destructuring-breaking-change?show=15172#a15172</guid>
<pubDate>Thu, 09 Jul 2026 15:57:10 +0000</pubDate>
</item>
<item>
<title>Answered: Will :keys! work with nested maps?</title>
<link>https://ask.clojure.org/index.php/15160/will-keys-work-with-nested-maps?show=15166#a15166</link>
<description>&lt;p&gt;If we try that code in a REPL, we see that it complains about &lt;code&gt;:e&lt;/code&gt; being missing:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;user=&amp;gt; (let [sample-map {:a 1 :b {:a 2 :b 3 :c 4 :d 42}}
             {a :a {aa :a :as m :keys! [b c &amp;amp; d e]} :b} (dissoc sample-map :c)] b)
Execution error (IllegalArgumentException) at user/eval126 (REPL:1).
Missing required key: :e
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;But the test is weird because &lt;code&gt;sample-map&lt;/code&gt; doesn't actually have a &lt;code&gt;:c&lt;/code&gt; key at the top level, only nested under &lt;code&gt;:b&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;In answer to your overall question, yes, &lt;code&gt;:keys!&lt;/code&gt; works anywhere that &lt;code&gt;:keys&lt;/code&gt; already works, and that includes nested map destructuring.&lt;/p&gt;
&lt;p&gt;Here's an example from our code at work:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;  [{:keys! [worldsingles-application members actioner database]
    {:keys! [&amp;amp; redis-pubsub] pubsub :redis-pubsub} :worldsingles-application
    :as service}]
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This checks that &lt;code&gt;:redis-pubsub&lt;/code&gt; is a key under &lt;code&gt;:worldsingles-application&lt;/code&gt; which is a key of &lt;code&gt;service&lt;/code&gt;, but does not bind &lt;code&gt;redis-pubsub&lt;/code&gt;, and also binds &lt;code&gt;pubsub&lt;/code&gt; to the &lt;code&gt;:redis-pubsub&lt;/code&gt; key. Yes, we have Alpha 2 in  production and this code used to be multiple &lt;code&gt;let&lt;/code&gt; bindings and explicit checks for keys being present.&lt;/p&gt;
</description>
<category>Test</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/15160/will-keys-work-with-nested-maps?show=15166#a15166</guid>
<pubDate>Mon, 06 Jul 2026 16:08:02 +0000</pubDate>
</item>
<item>
<title>Answered: Namespaced map conversion fails when namespace keyword starts with a number</title>
<link>https://ask.clojure.org/index.php/15159/namespaced-conversion-fails-namespace-keyword-starts-number?show=15161#a15161</link>
<description>&lt;blockquote&gt;&lt;p&gt;It looks like Clojure has no problem with either :0 or :0/a&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;It does, it just doesn't complain - there are very few explicit checks and in general it's GIGO (garbage in, garbage out).&lt;/p&gt;
&lt;p&gt;From &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojure.org/reference/reader&quot;&gt;https://clojure.org/reference/reader&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;Symbols begin with a non-numeric character [...]
[...]&lt;br&gt;
Keywords are like symbols [...]&lt;/p&gt;
&lt;/blockquote&gt;
</description>
<category>Clojure</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/15159/namespaced-conversion-fails-namespace-keyword-starts-number?show=15161#a15161</guid>
<pubDate>Mon, 06 Jul 2026 15:27:22 +0000</pubDate>
</item>
<item>
<title>Answered: Changing type tags can lead to cryptic errors</title>
<link>https://ask.clojure.org/index.php/15124/changing-type-tags-can-lead-to-cryptic-errors?show=15156#a15156</link>
<description>&lt;p&gt;It might be useful for the compiler to give a warning when a var is redefined such that it loses a primitive interface.&lt;/p&gt;
&lt;p&gt;We could still detect these changes without compiler changes like this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Clojure 1.12.5
user=&amp;gt; (defn f ^long [^long a] a)
#'user/f
user=&amp;gt; (add-watch #'f ::undo-prim (fn [_ _ old new] (when (and (instance? clojure.lang.IFn$LL old) (not (instance? clojure.lang.IFn$LL new))) (println &quot;WARNING: removed clojure.lang.IFn$LL from f&quot;))))
#'user/f
user=&amp;gt; (defn f [a] a)
WARNING: removed clojure.lang.IFn$LL from f
#'user/f
&lt;/code&gt;&lt;/pre&gt;
</description>
<category>Compiler</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/15124/changing-type-tags-can-lead-to-cryptic-errors?show=15156#a15156</guid>
<pubDate>Fri, 03 Jul 2026 00:06:18 +0000</pubDate>
</item>
<item>
<title>Possibly avoidable identity call to force instance method on Class literals</title>
<link>https://ask.clojure.org/index.php/15155/possibly-avoidable-identity-force-instance-method-literals</link>
<description>&lt;p&gt;As of Clojure 1.13.0-alpha2, &lt;code&gt;(.method ClassName)&lt;/code&gt; expands to &lt;code&gt;(.method ^Class (identity ClassName))&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;This is to force &lt;code&gt;(.method ClassName)&lt;/code&gt; to always be an instance method. Without this, it would expand to &lt;code&gt;(. ClassName method)&lt;/code&gt;, which may instead be interpreted as a static method.&lt;/p&gt;
&lt;p&gt;For example, &lt;code&gt;(.getMethods String)&lt;/code&gt; expands to &lt;code&gt;(.getMethods ^Class (identity String))&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;This was introduced in these two commits:&lt;br&gt;
- &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/clojure/clojure/commit/f95175264df36c3d8fe2113aa9af92cda0f2f5c8&quot;&gt;force instance member interpretation of (.method ClassName), e.g. (.getMethods String) works&lt;/a&gt;&lt;br&gt;
- &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/clojure/clojure/commit/e45046da8f7fef82157b58af54d1ac6de8e31160&quot;&gt;added autohinting to Class in macroexpansion of (.instanceMethodOfClass Classname) calls&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Since then, Clojure has added support for qualified methods which we can use to reliably propagate the tag without any runtime changes. For example, expanding to &lt;code&gt;(Class/.getMethods String)&lt;/code&gt; is now equivalent to &lt;code&gt;(.getMethods ^Class (identity String))&lt;/code&gt; in terms of tag propagation.&lt;/p&gt;
&lt;p&gt;I have a proof-of-concept &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/frenchy64/clojure/pull/52/changes&quot;&gt;here&lt;/a&gt; that includes disassembled and decompiled output before and after the change. The net effect of using qualified methods in this case under direct linking is a removal of a single method call to &lt;code&gt;identity&lt;/code&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;   3: invokestatic  #20                 // Method clojure/core$identity.invokeStatic:(Ljava/lang/Object;)Ljava/lang/Object;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The effect is more substantial without direct linking (not included in the PR), with &lt;code&gt;clojure.core/identity&lt;/code&gt; also being added to the static initializer.&lt;/p&gt;
&lt;p&gt;I've also experimented with expanding to &lt;code&gt;(. (do String) getMethods)&lt;/code&gt; (see earlier commits in that PR), which seems to also work and might be another approach.&lt;/p&gt;
</description>
<category>Compiler</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/15155/possibly-avoidable-identity-force-instance-method-literals</guid>
<pubDate>Thu, 02 Jul 2026 23:47:10 +0000</pubDate>
</item>
<item>
<title>error printed using pprint in clojure 1.13.0-alpha1</title>
<link>https://ask.clojure.org/index.php/15153/error-printed-using-pprint-in-clojure-1-13-0-alpha1</link>
<description>&lt;pre&gt;&lt;code&gt;❯ clj -Sdeps '{:deps {org.clojure/clojure {:mvn/version &quot;1.13.0-alpha1&quot;}}}'
Clojure 1.13.0-alpha1
user=&amp;gt; (clojure.pprint/pprint :foo)
Execution error (ClassCastException) at clojure.pprint.proxy$java.io.Writer$IDeref$PrettyFlush$4923d848/flush (REPL:-1).
class clojure.pprint.proxy$java.io.Writer$IDeref$PrettyFlush$4923d848 cannot be cast to class clojure.pprint.PrettyFlush (clojure.pprint.proxy$java.io.Writer$IDeref$PrettyFlush$4923d848 is in unnamed module of loader 'app'; clojure.pprint.PrettyFlush is in unnamed module of loader clojure.lang.DynamicClassLoader @36a58466)
:foo
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;reported by djblue in #clojure-dev&lt;/p&gt;
</description>
<category>Printing</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/15153/error-printed-using-pprint-in-clojure-1-13-0-alpha1</guid>
<pubDate>Thu, 02 Jul 2026 20:22:36 +0000</pubDate>
</item>
<item>
<title>Syntax-quoted lists can return nil, differs from ClojureScript</title>
<link>https://ask.clojure.org/index.php/15152/syntax-quoted-lists-can-return-differs-from-clojurescript</link>
<description>&lt;p&gt;Syntax quoted lists can return &lt;code&gt;nil&lt;/code&gt; if only empty seqables are spliced into it:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Clojure 1.12.5
user=&amp;gt; `(~@[])
nil
user=&amp;gt; `(~@[] ~@[])
nil
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;However, the implementation then ensures syntax-quoted empty lists are not nil:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Clojure 1.12.5
user=&amp;gt; `()
()
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;ClojureScript returns an empty list in these cases:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;`(~@[])
=&amp;gt; ()
`(~@[] ~@[])
=&amp;gt; ()
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The expansion of syntax quote itself is not necessarily a problem if it differs between platforms, but here the evaluation of the expansion differs. This can cause macros to behave differently between platforms (e.g., JVM Clojure vs bootstrapped cljs).&lt;/p&gt;
&lt;p&gt;This behavior seems to be present with all versions of Clojure &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/clojure/clojure/blob/f85444e6f890eb585e598efefdbd84727427e0a4/src/jvm/clojure/lang/LispReader.java#L731&quot;&gt;including 1.0.0&lt;/a&gt;, so perhaps the ship has sailed here. I went searching for an existing issue or documentation and AFAICT only &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojure.atlassian.net/browse/CLJ-1425&quot;&gt;CLJ-1425&lt;/a&gt; mentions this oddity.&lt;/p&gt;
&lt;p&gt;The reference docs for &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojure.org/reference/reader#syntax-quote&quot;&gt;Syntax Quote&lt;/a&gt; also seem to contradict this behavior:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;For Lists/Vectors/Sets/Maps, syntax-quote establishes a template of the corresponding data structure.&lt;/p&gt;
&lt;/blockquote&gt;
</description>
<category>Syntax and reader</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/15152/syntax-quoted-lists-can-return-differs-from-clojurescript</guid>
<pubDate>Sun, 28 Jun 2026 20:43:55 +0000</pubDate>
</item>
<item>
<title>Answered: Why is aset at least 25 times faster than aset-long?</title>
<link>https://ask.clojure.org/index.php/15138/why-is-aset-at-least-25-times-faster-than-aset-long?show=15139#a15139</link>
<description>&lt;p&gt;We’ve spent a bunch of time on this and got into some surprising places with it. I am very much hoping all these set functions will be rewritten in next release.&lt;/p&gt;
</description>
<category>Clojure</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/15138/why-is-aset-at-least-25-times-faster-than-aset-long?show=15139#a15139</guid>
<pubDate>Mon, 15 Jun 2026 17:05:19 +0000</pubDate>
</item>
<item>
<title>Answered: Why do literal vectors ignore type hinting?</title>
<link>https://ask.clojure.org/index.php/15136/why-do-literal-vectors-ignore-type-hinting?show=15137#a15137</link>
<description>&lt;p&gt;Literal collections are tagged as IPersistentVector, IPersistentMap, etc and as constant expressions won’t preserve type hints. It is better here to use the new qualified method syntax with param-tags hints if needed.&lt;/p&gt;
</description>
<category>Clojure</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/15136/why-do-literal-vectors-ignore-type-hinting?show=15137#a15137</guid>
<pubDate>Sun, 14 Jun 2026 23:09:31 +0000</pubDate>
</item>
<item>
<title>Consider including a built-in wrapper around `java.net.http.HttpClient` in future versions of Clojure</title>
<link>https://ask.clojure.org/index.php/15129/consider-including-wrapper-around-httpclient-versions-clojure</link>
<description>&lt;p&gt;Java 9 introduced &lt;code&gt;java.net.http.HttpClient&lt;/code&gt;[1] with support for HTTP/1.1, HTTP/2 as well as WebSocket along with other features. It was later standardized in Java 11[2] and has become one of the top picks for Java programs. The latest version of the HTTP client shipped with Java 26 also added support for HTTP/3.[3] &lt;/p&gt;
&lt;p&gt;It would be nice for future versions of Clojure that are based on Java 11+ to include a new namespace with wrapper functions around &lt;code&gt;java.net.http.HttpClient&lt;/code&gt; to make it easier (without all the OOP ceremonies) to work with HTTP in Clojure programs out of the box without relying on any 3rd-party libraries.&lt;/p&gt;
&lt;p&gt;Examples of prior art:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/gnarroway/hato&quot;&gt;https://github.com/gnarroway/hato&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/schmee/java-http-clj&quot;&gt;https://github.com/schmee/java-http-clj&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/babashka/http-client&quot;&gt;https://github.com/babashka/http-client&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://central.sonatype.com/artifact/com.cognitect/http-client&quot;&gt;https://central.sonatype.com/artifact/com.cognitect/http-client&lt;/a&gt;&lt;br&gt;
(upcoming?)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;[1] &lt;a rel=&quot;nofollow&quot; href=&quot;https://openjdk.org/jeps/110&quot;&gt;https://openjdk.org/jeps/110&lt;/a&gt;&lt;br&gt;
[2] &lt;a rel=&quot;nofollow&quot; href=&quot;https://openjdk.org/jeps/321&quot;&gt;https://openjdk.org/jeps/321&lt;/a&gt;&lt;br&gt;
[3] &lt;a rel=&quot;nofollow&quot; href=&quot;https://openjdk.org/jeps/517&quot;&gt;https://openjdk.org/jeps/517&lt;/a&gt;&lt;/p&gt;
</description>
<category>Java Interop</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/15129/consider-including-wrapper-around-httpclient-versions-clojure</guid>
<pubDate>Mon, 08 Jun 2026 01:37:14 +0000</pubDate>
</item>
<item>
<title>Answered: Object.clone() confusion</title>
<link>https://ask.clojure.org/index.php/15125/object-clone-confusion?show=15128#a15128</link>
<description>&lt;p&gt;clone() is a protected method - you should generally not call it on an arbitrary object.  In Java, you can't even make that call, you'll get &quot;clone() has protected access in java.lang.Object&quot;. It's a quirk of Clojure's impl that it even makes it possible via reflection. &lt;/p&gt;
&lt;p&gt;So, my suggestion is to not call clone() at all. There are many, many reasons clone() is problematic and considered one of the more questionable features of Java's early design.&lt;/p&gt;
</description>
<category>Clojure</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/15125/object-clone-confusion?show=15128#a15128</guid>
<pubDate>Sat, 06 Jun 2026 00:06:59 +0000</pubDate>
</item>
<item>
<title>Request: allow a user function to be specified as the target of clojure.main/report-error</title>
<link>https://ask.clojure.org/index.php/15120/request-allow-function-specified-target-clojure-report-error</link>
<description>&lt;p&gt;The three current targets (&lt;code&gt;file&lt;/code&gt;, &lt;code&gt;none&lt;/code&gt;, &lt;code&gt;stderr&lt;/code&gt;) all serialize all of the error data to a string. During development, it would be convenient to be able to define a function that is called with the exception instance. This function might capture additional application state, or open a window in the user's editor, etc.&lt;/p&gt;
&lt;p&gt;Note that it is not possible to work around this by replacing &lt;code&gt;report-error&lt;/code&gt; itself because the entire clojure.main namespace is AOT-compiled, so &lt;code&gt;alter-var-root&lt;/code&gt; has no effect.&lt;/p&gt;
&lt;p&gt;See &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/clojure-emacs/cider/issues/3850&quot;&gt;https://github.com/clojure-emacs/cider/issues/3850&lt;/a&gt; for an example where this feature would be helpful.&lt;/p&gt;
&lt;p&gt;Related Slack thread: &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojurians.slack.com/archives/C03S1KBA2/p1779991120304049&quot;&gt;https://clojurians.slack.com/archives/C03S1KBA2/p1779991120304049&lt;/a&gt;&lt;/p&gt;
</description>
<category>Clojure</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/15120/request-allow-function-specified-target-clojure-report-error</guid>
<pubDate>Tue, 02 Jun 2026 23:53:32 +0000</pubDate>
</item>
<item>
<title>Answered: :or destructuring doesn't update object</title>
<link>https://ask.clojure.org/index.php/13141/or-destructuring-doesnt-update-object?show=15118#a15118</link>
<description>&lt;p&gt;I logged an improvement request for this here, happy to collect more ideas here. &lt;/p&gt;
&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://clojure.atlassian.net/browse/CLJ-2957&quot;&gt;https://clojure.atlassian.net/browse/CLJ-2957&lt;/a&gt;&lt;/p&gt;
</description>
<category>Clojure</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/13141/or-destructuring-doesnt-update-object?show=15118#a15118</guid>
<pubDate>Mon, 01 Jun 2026 17:45:30 +0000</pubDate>
</item>
<item>
<title>Answered: `eval` using functions with metadata</title>
<link>https://ask.clojure.org/index.php/15115/eval-using-functions-with-metadata?show=15116#a15116</link>
<description>&lt;p&gt;You're eval'ing + to a function object there when it seems like you should be staying in symbol land:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;user=&amp;gt; (eval (list (with-meta '+ {}) 1 2))
3
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;A function object itself is not Clojure data (other than opaquely as an object). When working symbolically, you should stay in symbols.&lt;/p&gt;
&lt;p&gt;There are some places where the compiler uses an escape hatch of print + read-eval (&lt;code&gt;#=&lt;/code&gt;) to recover custom types (sorted maps and sets), but I'd consider that implementation details, not something you as a user should be doing generally.&lt;/p&gt;
</description>
<category>Syntax and reader</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/15115/eval-using-functions-with-metadata?show=15116#a15116</guid>
<pubDate>Mon, 01 Jun 2026 16:31:28 +0000</pubDate>
</item>
<item>
<title>Answered: Should reduce-kv support String?</title>
<link>https://ask.clojure.org/index.php/15109/should-reduce-kv-support-string?show=15110#a15110</link>
<description>&lt;p&gt;Interesting idea! Logged as &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojure.atlassian.net/browse/CLJ-2956&quot;&gt;https://clojure.atlassian.net/browse/CLJ-2956&lt;/a&gt;&lt;/p&gt;
</description>
<category>Protocols</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/15109/should-reduce-kv-support-string?show=15110#a15110</guid>
<pubDate>Fri, 29 May 2026 21:21:22 +0000</pubDate>
</item>
<item>
<title>Consider allowing passing two arguments to sets used as functions</title>
<link>https://ask.clojure.org/index.php/15104/consider-allowing-passing-two-arguments-sets-used-functions</link>
<description>&lt;p&gt;Similar to how &lt;code&gt;get&lt;/code&gt; works with the 3rd &lt;code&gt;not-found&lt;/code&gt; argument.&lt;/p&gt;
&lt;p&gt;It already works in CLJS:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;ClojureScript 1.12.116
cljs.user=&amp;gt; (#{:a} :b :c)
:c
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;In Clojure, it errors out:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Clojure 1.12.0
user=&amp;gt; (#{:a} :b :c)
Execution error (ArityException) at user/eval1 (REPL:1).
Wrong number of args (2) passed to: clojure.lang.PersistentHashSet
&lt;/code&gt;&lt;/pre&gt;
</description>
<category>Clojure</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/15104/consider-allowing-passing-two-arguments-sets-used-functions</guid>
<pubDate>Tue, 26 May 2026 13:44:16 +0000</pubDate>
</item>
<item>
<title>Answered: The behavior of `filter` on infinite sequences in Transducers</title>
<link>https://ask.clojure.org/index.php/15095/the-behavior-of-filter-on-infinite-sequences-in-transducers?show=15096#a15096</link>
<description>&lt;p&gt;&lt;code&gt;take&lt;/code&gt; converts its collection argument into a seq, and making a seq out of an eduction is done via the &lt;code&gt;java.lang.Iterable&lt;/code&gt; route. That route moves the data around in chunks of size 32. So &lt;code&gt;(take ... (eduction ...))&lt;/code&gt; will try to fetch 32 elements regardless of the number passed to &lt;code&gt;take&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;So, it's not about transducers, it's about how eduction and converting it into a seq work.&lt;/p&gt;
&lt;p&gt;You'll see the same behavior with &lt;code&gt;sequence&lt;/code&gt; - but that's because it creates a chunked sequence internally.&lt;/p&gt;
</description>
<category>Transducers</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/15095/the-behavior-of-filter-on-infinite-sequences-in-transducers?show=15096#a15096</guid>
<pubDate>Sun, 24 May 2026 08:31:02 +0000</pubDate>
</item>
<item>
<title>Answered: Can clojure builds be reproducible? (new Debian forky requirement)</title>
<link>https://ask.clojure.org/index.php/15083/can-clojure-builds-reproducible-debian-forky-requirement?show=15087#a15087</link>
<description>&lt;p&gt;Reproducible compilation is not currently a priority for us. But happy to leave this open to hear more reasons why that is important and collect votes.&lt;/p&gt;
</description>
<category>Clojure</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/15083/can-clojure-builds-reproducible-debian-forky-requirement?show=15087#a15087</guid>
<pubDate>Tue, 19 May 2026 19:56:55 +0000</pubDate>
</item>
<item>
<title>Answered: `(:k m)` returns `nil` while `(identical? (first (keys m)) :k)` is `true` — two coexisting `Keyword` instances?</title>
<link>https://ask.clojure.org/index.php/15073/returns-while-identical-first-coexisting-keyword-instances?show=15078#a15078</link>
<description>&lt;p&gt;It might also be interesting to know if you are getting a null due to not-found key vs null value in the map. You could supply a not-found arg on (:payload result :NOT-FOUND) to distinguish.&lt;/p&gt;
&lt;p&gt;Have you recently updated Clojure?&lt;/p&gt;
&lt;p&gt;Is this problem reproducible such that you could try it again with different code, deps, etc?&lt;/p&gt;
&lt;p&gt;Keyword invocation uses special call sites and the compiler code for that changed in Clojure 1.12.3, so I would be interested in whether the behavior changes if you use Clojure 1.12.2. &lt;/p&gt;
&lt;p&gt;Or alternately, does the behavior change if you modify the code from &lt;code&gt;(:payload result)&lt;/code&gt; to &lt;code&gt;(get result :payload)&lt;/code&gt;.&lt;/p&gt;
</description>
<category>Clojure</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/15073/returns-while-identical-first-coexisting-keyword-instances?show=15078#a15078</guid>
<pubDate>Mon, 11 May 2026 16:12:27 +0000</pubDate>
</item>
<item>
<title>Answered: Reflection warning when long hint on an argument</title>
<link>https://ask.clojure.org/index.php/15067/reflection-warning-when-long-hint-on-an-argument?show=15068#a15068</link>
<description>&lt;p&gt;It's the same thing as in &lt;a rel=&quot;nofollow&quot; href=&quot;https://ask.clojure.org/index.php/13501/primitive-type-hints-arguments-turns-the-return-value-object&quot;&gt;https://ask.clojure.org/index.php/13501/primitive-type-hints-arguments-turns-the-return-value-object&lt;/a&gt;.&lt;/p&gt;
</description>
<category>Java Interop</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/15067/reflection-warning-when-long-hint-on-an-argument?show=15068#a15068</guid>
<pubDate>Fri, 01 May 2026 21:12:15 +0000</pubDate>
</item>
<item>
<title>Answered: Optimize `eduction`</title>
<link>https://ask.clojure.org/index.php/15027/optimize-eduction?show=15033#a15033</link>
<description>&lt;p&gt;Logged as &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojure.atlassian.net/browse/CLJ-2953&quot;&gt;https://clojure.atlassian.net/browse/CLJ-2953&lt;/a&gt;&lt;/p&gt;
</description>
<category>Transducers</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/15027/optimize-eduction?show=15033#a15033</guid>
<pubDate>Sun, 05 Apr 2026 21:50:04 +0000</pubDate>
</item>
<item>
<title>Answered: &quot;Nested&quot; vs &quot;lateral&quot; exception causes</title>
<link>https://ask.clojure.org/index.php/15031/nested-vs-lateral-exception-causes?show=15032#a15032</link>
<description>&lt;p&gt;I'm not sure this problem is common enough to warrant solving in core or extending the existing ex-info. If you are trying to throw a map bundling multiple exceptions, this really seems like a data problem more than an exception problem, and we have plenty of ways to bundle data into the ex map.&lt;/p&gt;
&lt;p&gt;In Java, the typical solution for (one) lateral exception is to use &lt;a rel=&quot;nofollow&quot; href=&quot;https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ExecutionException.html&quot;&gt;ExecutionException&lt;/a&gt;, doesn't handle multiple though.&lt;/p&gt;
</description>
<category>Errors</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/15031/nested-vs-lateral-exception-causes?show=15032#a15032</guid>
<pubDate>Sun, 05 Apr 2026 21:46:32 +0000</pubDate>
</item>
<item>
<title>Answered: Destructuring {:as opts} unexpected behaviour with seq</title>
<link>https://ask.clojure.org/index.php/15028/destructuring-as-opts-unexpected-behaviour-with-seq?show=15029#a15029</link>
<description>&lt;p&gt;A lot of this can be broadly considered &quot;garbage-in, garbage-out&quot;. &lt;code&gt;{:as opts}&lt;/code&gt; is map destructuring and so if you give it a non-map, you'll get undefined behavior.&lt;/p&gt;
&lt;p&gt;In particular, try these expressions on Clojure 1.10 and you'll see that many of them throw exceptions.&lt;/p&gt;
&lt;p&gt;Clojure 1.11 introduced a new meaning for some key/value destructuring -- see &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojure.org/news/2021/03/18/apis-serving-people-and-programs&quot;&gt;https://clojure.org/news/2021/03/18/apis-serving-people-and-programs&lt;/a&gt; -- which changed the undefined behavior, in order to support new use cases.&lt;/p&gt;
&lt;p&gt;Bottom line: pass a non-map to map destructuring and you are in undefined behavior territory. It just happened to change between 1.10 and 1.11 so that some cases that threw exceptions now just produce &quot;junk&quot; instead.&lt;/p&gt;
</description>
<category>Sequences</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/15028/destructuring-as-opts-unexpected-behaviour-with-seq?show=15029#a15029</guid>
<pubDate>Sun, 05 Apr 2026 02:22:50 +0000</pubDate>
</item>
<item>
<title>Answered: requiring an empty .clj without an alias should fail as with an alias</title>
<link>https://ask.clojure.org/index.php/15022/requiring-an-empty-clj-without-alias-should-fail-with-alias?show=15023#a15023</link>
<description>&lt;p&gt;Logged:&lt;br&gt;
&lt;a rel=&quot;nofollow&quot; href=&quot;https://clojure.atlassian.net/browse/CLJ-2951&quot;&gt;https://clojure.atlassian.net/browse/CLJ-2951&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;And one for compile:&lt;br&gt;
&lt;a rel=&quot;nofollow&quot; href=&quot;https://clojure.atlassian.net/browse/CLJ-2952&quot;&gt;https://clojure.atlassian.net/browse/CLJ-2952&lt;/a&gt;&lt;/p&gt;
</description>
<category>Clojure</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/15022/requiring-an-empty-clj-without-alias-should-fail-with-alias?show=15023#a15023</guid>
<pubDate>Thu, 02 Apr 2026 20:41:10 +0000</pubDate>
</item>
<item>
<title>Answered: Is taggedliteral's equality check inefficient?</title>
<link>https://ask.clojure.org/index.php/15002/is-taggedliterals-equality-check-inefficient?show=15020#a15020</link>
<description>&lt;p&gt;Logged as &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojure.atlassian.net/browse/CLJ-2950&quot;&gt;https://clojure.atlassian.net/browse/CLJ-2950&lt;/a&gt;&lt;/p&gt;
</description>
<category>Records and Types</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/15002/is-taggedliterals-equality-check-inefficient?show=15020#a15020</guid>
<pubDate>Tue, 31 Mar 2026 19:58:35 +0000</pubDate>
</item>
<item>
<title>Answered: Optimized str function</title>
<link>https://ask.clojure.org/index.php/14990/optimized-str-function?show=15003#a15003</link>
<description>&lt;p&gt;I've done some &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/bsless/prrr&quot;&gt;independent exploration&lt;/a&gt; of the options space for optimizing &lt;code&gt;str&lt;/code&gt; which does not involve anything ground shattering but still gives good performance improvements&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;variadic arities (up to 20, yuck) will probably give the best performance. Can settle for common cases like up to 5  (apply str will still suck but whatever)&lt;/li&gt;
&lt;li&gt;using reduce instead of a loop (would probably require redefining str or providing a str1 with the old impl for bootstrap purposes)&lt;/li&gt;
&lt;li&gt;using inline meta, orthogonal to all other options&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Additionally, having a function like &lt;code&gt;str&lt;/code&gt; which only takes a sequence and reduces over it could provide a better code path than (apply str xs)&lt;/p&gt;
&lt;p&gt;Similar work has been done in &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/joinr/spork/blob/master/src/spork/util/general.clj#L835&quot;&gt;spork&lt;/a&gt; and &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/kumarshantanu/stringer&quot;&gt;stringer&lt;/a&gt;&lt;/p&gt;
</description>
<category>Sequences</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14990/optimized-str-function?show=15003#a15003</guid>
<pubDate>Sun, 29 Mar 2026 08:47:19 +0000</pubDate>
</item>
<item>
<title>Why doesn't defn also implicitly name the anonymous function it defines for recursion?</title>
<link>https://ask.clojure.org/index.php/15000/doesnt-defn-implicitly-anonymous-function-defines-recursion</link>
<description>&lt;p&gt;Why doesn't &lt;code&gt;defn&lt;/code&gt; implicitly name the function to create a named recursion point?&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(clojure.walk/macroexpand-all
  '(defn foo [x]
     (foo x)))
; =&amp;gt;
(def foo
  (fn*
    ([x]
     (foo x))))
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This could instead expand to&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(def foo
  (fn* foo ; note the foo here
    ([x]
     (foo x))))
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;How it works right now, &lt;code&gt;foo&lt;/code&gt; resolves to a global var &lt;code&gt;#'foo&lt;/code&gt;, which is created when the &lt;code&gt;(def ...)&lt;/code&gt; form is analyzed. In the second case, it resolves directly to the function object. Thus, it should save us a var dereference at runtime in this case.&lt;/p&gt;
&lt;p&gt;EDIT: Found out, this is exactly what &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojure.org/reference/compilation#directlinking&quot;&gt;direct linking&lt;/a&gt; is used for.&lt;/p&gt;
</description>
<category>Macros</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/15000/doesnt-defn-implicitly-anonymous-function-defines-recursion</guid>
<pubDate>Sat, 21 Mar 2026 13:49:43 +0000</pubDate>
</item>
<item>
<title>Controlled Bailout, Jira issue 2213</title>
<link>https://ask.clojure.org/index.php/14999/controlled-bailout-jira-issue-2213</link>
<description>&lt;p&gt;I would like to improve &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojure.atlassian.net/browse/CLJ-2213&quot;&gt;Issue 2213&lt;/a&gt; as follows. Do you think, this makes sense? Shall I become contributor for this? &lt;/p&gt;
&lt;p&gt;The new description would be:&lt;/p&gt;
&lt;p&gt;When developing Input-Process-Output tools I am often in the situation, that I have a sequence of activities (e.g. opening a file, spec checking a file, calling external tools, creating files), which each could fail in certain ways. Clojure does not have a good way to control such a sequence of activities in a way that all sorts of things, which could go wrong, can be handled comfortably. In imperative programming languages concepts like early exit or bailout are used. These are not not very functional. Unfortunately practical problems are often like this.&lt;/p&gt;
&lt;p&gt;The issue is a bit more general and a solution would be nice not only for those who develop such sort of tools. So I can give a simple example.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(let [config-file (get-file-from-network xy)
      config-file (parse-edn config-file)
      syntax-ok?   (spec-check config-file)]
  (do-something-with config-file))
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;As all these steps can fail, we could instead implement it like this.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(if-let [config-file (get-file-from-network xy)]
  (if-let [config-file (parse-edn config-file)]
    (if (spec-check config-file)
      (do-something-with config-file))))
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Now the code has suffered already a lot. The sequential nature of the problem is lost. And it is not even doing what we need. We have to report to the user what went wrong.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(if-let [config-file (get-file-from-network xy)]
  (if-let [config-file (parse-edn config-file)]
    (if (spec-check config-file)
      (do-something-with config-file)
      :file-has-syntax-errors)
    :file-not-valid-edn)
  :file-cannot be openned)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;But this is still not doing what we need. We have to provide more information about each failure. If a file cannot be openned, is it because the file does not exist or we do not have read permissions? And what did the spec check tell us? So we cannot just use &lt;code&gt;nil&lt;/code&gt; as a universal failure. We must deliver more information when failing. And we cannot use if-let, either. So we are not even done.&lt;/p&gt;
&lt;p&gt;This problem report asks for a better solution for this conceptual challenge.&lt;/p&gt;
&lt;p&gt;This example depicts a conflict that should not happen when using an appropriate programming language: First we are able to quickly make a prototype. But in the end the final code has not much in common with the first code any more. The final design is not driven by the problem domain, but by the technical need for an error handling. The need for a bailout mechanism in this example imposes too many huge code changes.&lt;/p&gt;
&lt;p&gt;The principal problem with all these solutions is that they coerce a sequence of actions into something which is not a sequence. If your problem is a sequence, then the implementation should also be a sequence.&lt;/p&gt;
&lt;h2&gt;Idea: Exceptions&lt;/h2&gt;
&lt;p&gt;As an alternative implementation I went with Exceptions. But it feels wrong, because I am talking about things, that are expected to fail. I cannot just use the Exceptions that are comming out of Java for example when opening a file for read. I need detailed information, what went wrong. If you are a command line tool, it is expected from you, that you provide good error messages. I ended up catching and rethrowing exceptions everywhere in the program.&lt;/p&gt;
&lt;h2&gt;Idea: Like for/doseq&lt;/h2&gt;
&lt;p&gt;For me I created a small macro, that extends &lt;code&gt;let&lt;/code&gt;. Then I use this syntax:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(let [[config-file error] (get-file-from-network xy)
      :escape     error
      config-file (parse-edn config-file)
      syntax-ok?   (spec-check config-file)]
  (do-something-with config-file))
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This often allows a surprisingly intuitive code. For example here:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(let [[config-file error-code] (get-file-from-network xy)
      :escape     (if (= error-code :does-not-exist) 
                    :file-xy-does-not-exist)
      :escape     (if (= error-code :io-error)
                    :file-xy-cannot-be-read)
      [config-file error-code] (parse-edn config-file)
      :escape     (if error-code :file-xy-not-legal-edn)
      syntax-ok?   (spec-check config-file)]
  (do-something-with config-file))
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This is inspired by the &lt;code&gt;for&lt;/code&gt;/&lt;code&gt;doseq&lt;/code&gt;. But I don't claim that this is a good solution for Clojure (although I think so). But I think, the &lt;code&gt;let&lt;/code&gt; macro is a good candidate when improving how Clojure can be used for such imperative things.&lt;/p&gt;
&lt;h2&gt;Idea: Using &lt;code&gt;if-let&lt;/code&gt;&lt;/h2&gt;
&lt;p&gt;I also investigated the solution, that was originally proposed by this issue.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(if-let [config-file (get-file-from-network xy)
         config-file (parse-edn config-file)
         config-file-ok? (spec-check config-file)]
  (do-something-with config-file)
  :error)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This problem with this solution is that none of the bindings are available in the else part. That makes it very hard to react accordingly. This is a nice and small new language feature. But I don't think, that in practice it would be of help so often. The example from the original issue was very artificial with mathematical operations that cannot fail. The first draft of this issue with that artificial example does not actally describe a real problem. That is why this issue has completelly been rewritten.&lt;/p&gt;
&lt;p&gt;Or course we could still bind everything, which was not failed. But I don't think, we would want that. It would have very interesting consequences to the compiling model.&lt;/p&gt;
&lt;h2&gt;Idea: Threading macros&lt;/h2&gt;
&lt;p&gt;As this issue is a about a sequence of activities, a new type of threading macro (e.g. &lt;code&gt;let-&amp;gt;&lt;/code&gt;) could also be an intuitive solution. But I have not tried anything like this.&lt;/p&gt;
&lt;h2&gt;Final Words&lt;/h2&gt;
&lt;p&gt;The principle challenge is, that all these solutions establish a sort of alternative control flow. It is a hard challenge to do this right, especially in a functional language. Like exceptions, that immediatelly exit and magically jump somewhere else. Clojure as a practically language could address this challenge.&lt;/p&gt;
</description>
<category>Clojure</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14999/controlled-bailout-jira-issue-2213</guid>
<pubDate>Sat, 21 Mar 2026 10:14:48 +0000</pubDate>
</item>
<item>
<title>Answered: Evaluating forms using eval can create a valid undesirable recursion point</title>
<link>https://ask.clojure.org/index.php/14991/evaluating-forms-using-create-valid-undesirable-recursion?show=14993#a14993</link>
<description>&lt;p&gt;I logged this as &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojure.atlassian.net/browse/CLJ-2947&quot;&gt;https://clojure.atlassian.net/browse/CLJ-2947&lt;/a&gt; but I don't think it's a big deal.&lt;/p&gt;
</description>
<category>Clojure</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14991/evaluating-forms-using-create-valid-undesirable-recursion?show=14993#a14993</guid>
<pubDate>Tue, 17 Mar 2026 15:46:56 +0000</pubDate>
</item>
<item>
<title>Answered: It's difficult to figure out options I can pass to slurp function.</title>
<link>https://ask.clojure.org/index.php/14975/its-difficult-to-figure-out-options-can-pass-slurp-function?show=14976#a14976</link>
<description>&lt;p&gt;This is fair. I created &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojure.atlassian.net/browse/CLJ-2944&quot;&gt;https://clojure.atlassian.net/browse/CLJ-2944&lt;/a&gt; to track this.&lt;/p&gt;
</description>
<category>Docs</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14975/its-difficult-to-figure-out-options-can-pass-slurp-function?show=14976#a14976</guid>
<pubDate>Fri, 27 Feb 2026 15:11:56 +0000</pubDate>
</item>
<item>
<title>Answered: Is it legal for a namespace to start with a number?</title>
<link>https://ask.clojure.org/index.php/14962/is-it-legal-for-a-namespace-to-start-with-a-number?show=14963#a14963</link>
<description>&lt;p&gt;As far as I can tell, there is no reason a namespace segment other than the first can't start with a number.&lt;/p&gt;
</description>
<category>Clojure</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14962/is-it-legal-for-a-namespace-to-start-with-a-number?show=14963#a14963</guid>
<pubDate>Mon, 23 Feb 2026 19:12:09 +0000</pubDate>
</item>
<item>
<title>Feature Request:Make anonymous fn/reify class name IDs per namespace instead of one global counter</title>
<link>https://ask.clojure.org/index.php/14935/feature-request-anonymous-namespace-instead-global-counter</link>
<description>&lt;p&gt;  Compiled anonymous functions and reify classes get names like ns$fn__4532, where the numeric suffix comes from a global AtomicInteger counter&lt;br&gt;
  (RT.nextID()).&lt;/p&gt;
&lt;p&gt; This counter is shared across the entire runtime and is consumed by fn classes, reify classes, constants tables, gensyms, etc.&lt;/p&gt;
&lt;p&gt;  The problem is that because the counter is global, any code change shifts the IDs for everything compiled after it. This makes profiling across builds&lt;br&gt;
  really painful, you can't meaningfully compare flame graphs because all the class names change even in code you didn't touch.&lt;/p&gt;
&lt;p&gt;  I'd like to propose scoping the ID counter per-namespace instead. Since the namespace is already part of the class name prefix, uniqueness is still&lt;br&gt;
  guaranteed. This would eliminate the cascading effect across unchanged namespaces and make profiling diffs actually useful.&lt;/p&gt;
&lt;p&gt;I'm not sure what's the downsides of this, but from what I saw of AtomicInteger, it isn't used a lot to break things.&lt;/p&gt;
&lt;p&gt;Thank you!&lt;/p&gt;
</description>
<category>Compiler</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14935/feature-request-anonymous-namespace-instead-global-counter</guid>
<pubDate>Wed, 18 Feb 2026 15:34:38 +0000</pubDate>
</item>
<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>Answered: bit-count in cljs but not clj</title>
<link>https://ask.clojure.org/index.php/14917/bit-count-in-cljs-but-not-clj?show=14918#a14918</link>
<description>&lt;p&gt;Logged as &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojure.atlassian.net/browse/CLJ-2937&quot;&gt;https://clojure.atlassian.net/browse/CLJ-2937&lt;/a&gt;&lt;/p&gt;
</description>
<category>Compiler</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14917/bit-count-in-cljs-but-not-clj?show=14918#a14918</guid>
<pubDate>Fri, 30 Jan 2026 14:20:06 +0000</pubDate>
</item>
<item>
<title>definterface doesn't expose gen-interface's :extends for interface extension</title>
<link>https://ask.clojure.org/index.php/14903/definterface-doesnt-interfaces-extends-interface-extension</link>
<description>&lt;p&gt;gen-interface allow :extends to specify one or more interfaces, which will be extended by this interface. &lt;/p&gt;
&lt;p&gt;definterface doesn't expose this.&lt;/p&gt;
&lt;p&gt;Use case is working with primitives (where protocols don’t help), to get things to dispatch nicely in a zero boxing primitive transducer implementation.&lt;/p&gt;
</description>
<category>Java Interop</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14903/definterface-doesnt-interfaces-extends-interface-extension</guid>
<pubDate>Mon, 26 Jan 2026 19:49:08 +0000</pubDate>
</item>
<item>
<title>Answered: How to force clojure.spec generator to skip a field</title>
<link>https://ask.clojure.org/index.php/14893/how-to-force-clojure-spec-generator-to-skip-a-field?show=14894#a14894</link>
<description>&lt;p&gt;Given that you're using &lt;code&gt;gen/let&lt;/code&gt;, why not just this?&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(gen/let [x (s/gen (s/keys :opt [::a]))
          y (s/gen (s/keys :opt [::a]))]
  {:x x
   :y (cond-&amp;gt; y (not (contains? x ::a)) (dissoc ::a))})
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Alternatively:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(gen/let [x (s/gen (s/keys :opt [::a]))
          y (s/gen (cond-&amp;gt; (s/keys :opt [::a])
                     (not (contains? x ::a))
                     (s/and #(not (contains? % ::a)))))]
  {:x x
   :y y})
&lt;/code&gt;&lt;/pre&gt;
</description>
<category>Spec</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14893/how-to-force-clojure-spec-generator-to-skip-a-field?show=14894#a14894</guid>
<pubDate>Thu, 15 Jan 2026 10:26:11 +0000</pubDate>
</item>
<item>
<title>Answered: Is invoking an anonymous primitive function expected to use the primitive interface?</title>
<link>https://ask.clojure.org/index.php/14888/invoking-anonymous-primitive-function-primitive-interface?show=14891#a14891</link>
<description>&lt;p&gt;Reviewing this it appears to be the same issue as &lt;a rel=&quot;nofollow&quot; href=&quot;https://ask.clojure.org/index.php/3326/cannot-create-anonymous-primitive-functions&quot;&gt;cannot-create-anonymous-primitive-functions&lt;/a&gt; which tracks with this jira &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojure.atlassian.net/browse/CLJ-919&quot;&gt;CLJ-919&lt;/a&gt;&lt;/p&gt;
</description>
<category>Clojure</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14888/invoking-anonymous-primitive-function-primitive-interface?show=14891#a14891</guid>
<pubDate>Tue, 13 Jan 2026 22:47:58 +0000</pubDate>
</item>
<item>
<title>Answered: clojure.core/subs should use type hints of ^CharSequence, NOT ^String</title>
<link>https://ask.clojure.org/index.php/14889/clojure-core-subs-should-use-type-hints-charsequence-string?show=14890#a14890</link>
<description>&lt;p&gt;Created jira and patch at &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojure.atlassian.net/browse/CLJ-2936&quot;&gt;https://clojure.atlassian.net/browse/CLJ-2936&lt;/a&gt;&lt;/p&gt;
</description>
<category>Java Interop</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14889/clojure-core-subs-should-use-type-hints-charsequence-string?show=14890#a14890</guid>
<pubDate>Tue, 13 Jan 2026 19:06:31 +0000</pubDate>
</item>
<item>
<title>Answered: Literals for Unicode code points (and perhaps also sequences thereof)</title>
<link>https://ask.clojure.org/index.php/14875/literals-unicode-code-points-perhaps-also-sequences-thereof?show=14886#a14886</link>
<description>&lt;p&gt;Created feature request jira &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojure.atlassian.net/browse/CLJ-2935&quot;&gt;https://clojure.atlassian.net/browse/CLJ-2935&lt;/a&gt;&lt;/p&gt;
</description>
<category>Syntax and reader</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14875/literals-unicode-code-points-perhaps-also-sequences-thereof?show=14886#a14886</guid>
<pubDate>Mon, 12 Jan 2026 22:26:24 +0000</pubDate>
</item>
<item>
<title>Answered: Reader docs say foo.bar is a qualified symbol but qualified-symbol? is false</title>
<link>https://ask.clojure.org/index.php/14882/reader-docs-say-foo-qualified-symbol-qualified-symbol-false?show=14883#a14883</link>
<description>&lt;p&gt;&quot;Qualified&quot; means more than one thing depending on context. Java classes are &quot;qualified&quot; by their package name. symbols are &quot;qualified&quot; by their namespace. class names are syntactically represented by a symbol which has overlapping senses - the class package is a dotted prefix that lives in the &quot;name&quot; part of the  symbol. &lt;/p&gt;
&lt;p&gt;&lt;code&gt;qualified-symbol?&lt;/code&gt; is specifically referring to namespace qualification.&lt;/p&gt;
&lt;p&gt;My guess is that Rich would say that the original sentence is correct and written as intended.&lt;/p&gt;
</description>
<category>Docs</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14882/reader-docs-say-foo-qualified-symbol-qualified-symbol-false?show=14883#a14883</guid>
<pubDate>Mon, 12 Jan 2026 22:08:25 +0000</pubDate>
</item>
<item>
<title>Answered: CVE-warning in org.fressian/fressian &lt;- org.clojure/data.fressian</title>
<link>https://ask.clojure.org/index.php/14872/cve-warning-org-fressian-fressian-org-clojure-data-fressian?show=14873#a14873</link>
<description>&lt;p&gt;I agree that this is a false positive. Neither org.fressian/fressian nor org.clojure/data.fressian depend on either Datomic or h2, either explicitly or implicitly, even via test deps, so not sure how that could be possible even via test deps. &lt;/p&gt;
&lt;p&gt;clj-watson depends on &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/dependency-check/DependencyCheck&quot;&gt;https://github.com/dependency-check/DependencyCheck&lt;/a&gt; to do its checks, and you can report false positives as an issue on its issue tracker &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/dependency-check/DependencyCheck/issues&quot;&gt;https://github.com/dependency-check/DependencyCheck/issues&lt;/a&gt;. &lt;/p&gt;
</description>
<category>Clojure</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14872/cve-warning-org-fressian-fressian-org-clojure-data-fressian?show=14873#a14873</guid>
<pubDate>Fri, 09 Jan 2026 16:31:43 +0000</pubDate>
</item>
<item>
<title>Answered: Why does the REPL incorrectly display my command after I press enter?</title>
<link>https://ask.clojure.org/index.php/14848/why-does-repl-incorrectly-display-command-after-press-enter?show=14858#a14858</link>
<description>&lt;p&gt;Updating the version of &lt;code&gt;rlwrap&lt;/code&gt; by building it from source fixed the issue.&lt;/p&gt;
&lt;p&gt;The version installed on my FreeBSD system was 0.45, the latest version available for the package manager, building from source yielded version 0.48, which seems to have fixed the display bug :)&lt;/p&gt;
</description>
<category>REPL</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14848/why-does-repl-incorrectly-display-command-after-press-enter?show=14858#a14858</guid>
<pubDate>Tue, 23 Dec 2025 08:15:40 +0000</pubDate>
</item>
<item>
<title>Octal escape sequence decoding in strings does not stop at non-octal digit</title>
<link>https://ask.clojure.org/index.php/14846/octal-escape-sequence-decoding-strings-does-stop-octal-digit</link>
<description>&lt;p&gt;Strings suppose to support standard Java escape sequences, including octal escape sequence: [0-7]{1,3} &lt;/p&gt;
&lt;p&gt;In Java decoding of octal sequences stop at the first non-octal digit or any other character if there are 1 or two octal digits in the escape sequence. For example:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;jshell&amp;gt; &quot;\18&quot;
$1 ==&amp;gt; &quot;\0018&quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;But Clojure reads up to 3 potentially octal digits greedily resulting in wrongly consuming non-octal digits:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Clojure 1.12.4
user=&amp;gt; &quot;\18&quot;
Syntax error reading source at (REPL:1:5).
Invalid digit: 8
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;non-octal characters:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Clojure 1.12.4
user=&amp;gt; &quot;\1d&quot;
Syntax error reading source at (REPL:1:5).
Invalid digit: d
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;And succeed only when there is line terminator or exact three octal digits in supported octal range:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Clojure 1.12.4
user=&amp;gt; &quot;\1&quot;
&quot;&quot;
user=&amp;gt; &quot;\1&quot;
&quot;&quot;
user=&amp;gt; &quot;\12&quot;
&quot;\n&quot;
user=&amp;gt; &quot;\123&quot;
&quot;S&quot;
user=&amp;gt; &quot;\123d&quot;
&quot;Sd&quot;
&lt;/code&gt;&lt;/pre&gt;
</description>
<category>Syntax and reader</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14846/octal-escape-sequence-decoding-strings-does-stop-octal-digit</guid>
<pubDate>Thu, 18 Dec 2025 09:35:53 +0000</pubDate>
</item>
<item>
<title>Answered: [clojure.edn] Leading zeros in numbers</title>
<link>https://ask.clojure.org/index.php/14798/clojure-edn-leading-zeros-in-numbers?show=14842#a14842</link>
<description>&lt;p&gt;Leading zeroes in Clojure should largely follow the lead of Java when the reference is unclear:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Long - multiple leading 0s allowed, treated as octal&lt;/li&gt;
&lt;li&gt;BigInteger - multiple leading 0s allowed, treated as decimal in Java BigInteger, octal in Clojure (this is a difference, but supported by the reader reference page)&lt;/li&gt;
&lt;li&gt;Double - multiple leading 0s allowed in either whole number part of exponent, treated as decimal &lt;/li&gt;
&lt;li&gt;BigDecimal - multiple leading 0s allowed, treated as decimal&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;With respect to edn, there are additional constraints - octal is not supported, and leading 0s not allowed in integers, but are allowed in decimal whole and exponents by my reading. I do not see support for your assertion &quot;even for floats&quot; - the constraint is listed only for integers). &lt;/p&gt;
&lt;p&gt;Thus I would expect that any leading 0s in an integer (with or without N suffix) should be invalid, yet they are all read as octal. So that seems like a potential bug. Because clojure.edn is a superset of edn, you could potentially contend this is additive syntax/semantics beyond edn but seems a little confusing.&lt;/p&gt;
&lt;p&gt;For floating points, by my reading, leading 0s in whole or exponent parts are allowed, so no issue or difference from Clojure or Java there afaict.&lt;/p&gt;
</description>
<category>Syntax and reader</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14798/clojure-edn-leading-zeros-in-numbers?show=14842#a14842</guid>
<pubDate>Mon, 15 Dec 2025 20:05:17 +0000</pubDate>
</item>
<item>
<title>Answered: `find` docstring enhancement proposal</title>
<link>https://ask.clojure.org/index.php/14828/find-docstring-enhancement-proposal?show=14832#a14832</link>
<description>&lt;p&gt;See &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojure.org/reference/data_structures#Maps&quot;&gt;https://clojure.org/reference/data_structures#Maps&lt;/a&gt; (and other places on that page) where &quot;entry&quot; is referred to and, in particular:&lt;/p&gt;
&lt;p&gt;&quot;...a sequence of map entries, which are key/value pairs&quot;&lt;/p&gt;
&lt;p&gt;See also &lt;a rel=&quot;nofollow&quot; href=&quot;https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Map.html&quot;&gt;https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Map.html&lt;/a&gt; where &quot;entry&quot; is referred to several times and also defined as a key/value pair.&lt;/p&gt;
&lt;p&gt;Searching the web for &lt;code&gt;map entry -java&lt;/code&gt; seems to indicate this is pretty common terminology in other languages as well.&lt;/p&gt;
</description>
<category>Clojure</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14828/find-docstring-enhancement-proposal?show=14832#a14832</guid>
<pubDate>Thu, 11 Dec 2025 20:35:32 +0000</pubDate>
</item>
<item>
<title>Answered: Aliased namespace in tagged literal</title>
<link>https://ask.clojure.org/index.php/14829/aliased-namespace-in-tagged-literal?show=14830#a14830</link>
<description>&lt;p&gt;Logged as &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojure.atlassian.net/browse/CLJ-2932&quot;&gt;https://clojure.atlassian.net/browse/CLJ-2932&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I reworded the title and problem as this slips into solution space (and I'm not sure that solution is even possible given the reader nature of the problem).&lt;/p&gt;
</description>
<category>Syntax and reader</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14829/aliased-namespace-in-tagged-literal?show=14830#a14830</guid>
<pubDate>Thu, 11 Dec 2025 20:18:34 +0000</pubDate>
</item>
<item>
<title>Answered: clojure.edn and clojure allows keywords with empty (&quot;&quot;) namespaces</title>
<link>https://ask.clojure.org/index.php/14811/clojure-edn-clojure-allows-keywords-with-empty-namespaces?show=14824#a14824</link>
<description>&lt;p&gt;Logged as &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojure.atlassian.net/browse/CLJ-2931&quot;&gt;https://clojure.atlassian.net/browse/CLJ-2931&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Other old and related JIRAs for relevance: &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojure.atlassian.net/browse/CLJ-1286&quot;&gt;CLJ-1286&lt;/a&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojure.atlassian.net/browse/CLJ-1252&quot;&gt;CLJ-1252&lt;/a&gt;&lt;/p&gt;
</description>
<category>Syntax and reader</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14811/clojure-edn-clojure-allows-keywords-with-empty-namespaces?show=14824#a14824</guid>
<pubDate>Tue, 09 Dec 2025 22:55:20 +0000</pubDate>
</item>
<item>
<title>Answered: Why is `list` defined with a RestFn instead of `create` method?</title>
<link>https://ask.clojure.org/index.php/14820/why-is-list-defined-with-a-restfn-instead-of-create-method?show=14823#a14823</link>
<description>&lt;p&gt;Probably only known to Rich, don't think these inconsistencies are important.&lt;/p&gt;
</description>
<category>Compiler</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14820/why-is-list-defined-with-a-restfn-instead-of-create-method?show=14823#a14823</guid>
<pubDate>Tue, 09 Dec 2025 22:44:08 +0000</pubDate>
</item>
<item>
<title>Answered: bug   bigdec</title>
<link>https://ask.clojure.org/index.php/14809/bug-bigdec?show=14822#a14822</link>
<description>&lt;p&gt;Logged as &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojure.atlassian.net/browse/CLJ-2930&quot;&gt;https://clojure.atlassian.net/browse/CLJ-2930&lt;/a&gt;&lt;/p&gt;
</description>
<category>Clojure</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14809/bug-bigdec?show=14822#a14822</guid>
<pubDate>Tue, 09 Dec 2025 22:36:21 +0000</pubDate>
</item>
</channel>
</rss>