首页›Clojure News›文章

Clojure 1.13.0-alpha7

2026年9月15日

AI 摘要 AI 生成,可能有误

Clojure 1.13.0-alpha7 已发布,引入了新的解构指令::missing,用于收集在带校验的 :keys!/:syms!/:strs!指令中被引用但输入映射中缺失的键,以及 :excess,它将一个名称绑定到解构形式未覆盖的所有输入键。该版本还包含错误修复(例如 Reflector.getMethods() 桥接方法以及 bigdec 强制转换的问题)和一些改进,如 transform-keys 以及一个会返回其值的 tap-> 变体。用户可以通过在 deps.edn 中添加 org.clojure/clojure 1.13.0-alpha7 版本,或通过 Clojure CLI 来试用它。

Clojure 1.13.0-alpha7 is now available! Find download and usage information on the Downloads page.

Destructuring additions

To gracefully handle missing information programmatically at runtime, use the :missing directive, which binds a name to a map of keys→nil that were named in checked keys directives but not found in the input map, traversing deeply through nested maps. This toggles the default behavior of :keys!/:syms!/:strs! from throwing to collecting into the named map.

继续阅读全文

为了尊重作者,这里只展示开头几段。你可以去原文阅读,或者在 HorizonReader 里读:划线做笔记、让 AI 帮忙。

更多来自 Clojure News

Clojure 1.12.7

AI 摘要Clojure 1.12.7 has been released, addressing a security vulnerability (GHSA-x4c4-68gp-vrhc) where Clojure function classes could be exploited alongside standard JDK classes to execute arbitrary code during deserialization of untrusted serialized Java data. As of this version, Clojure functions throw exceptions on serialization and deserialization by default, with the system property -Dclojure.serializable.fns=true available to explicitly allow these operations in known-safe contexts.

State of Clojure 2026 Survey

AI 摘要The annual State of Clojure 2026 Survey is now open, inviting users of Clojure, ClojureScript, or other Clojure dialects to participate. Running since 2010, the survey is the main barometer of the Clojure community's views and daily practices, takes only a few minutes, and closes on November 30, with results to be released toward the end of the year.

Clojure 1.13.0-alpha11

AI 摘要Clojure 1.13.0-alpha11 has been released, with download and usage information available on the Downloads page. This version fixes CLJ-2990, a bug where :req! on a nested map with :missing binds an internal Object. Users can try it by adding the version to their deps.edn or starting a REPL with the Clojure CLI.

Clojure 1.13.0-alpha10

AI 摘要Clojure 1.13.0-alpha10 has been released, featuring destructuring changes such as a new :req! directive to make top-level bindings required and :namespaced/keys directives that now qualify unqualified keywords (a potentially breaking change). The release also includes inliner updates enabling conditional inlining that can return nil, inlining of get-in with literal key vectors, and preservation of type hint metadata on macro invocations. Users can try it by updating their deps.edn dependencies or starting a REPL with the Clojure CLI.

Clojure 1.13.0-alpha9

AI 摘要Clojure 1.13.0-alpha9 has been released, featuring the removal of the :defaults directive, faster transient metadata propagation in into and update-vals, and various bug fixes such as catching protocol extensions of non-protocol methods and correcting the TransientArrayMap expansion threshold. The release also favors class files when reproducible builds set matching class and source timestamps. Users can try it by updating their deps.edn dependency or starting a REPL with the Clojure CLI.