logo
Kurashizu Blogwhere ideas flow
  • Home
  • News
  • Blog
  • About
  • Home
  • News
  • Blog
  • About

© 2026 Kurashizu. All rights reserved.

Admin·New Post·Service Status
Powered by Cloudflare·02.11.26
← Back to news

Clojure 1.13 adds support for checked keys

Original article
clojure.org|125 points|24 comments|by FelipeCortez|Jul 2, 2026

Clojure 1.13.0-alpha1: Introducing Checked Keys

Announcement: Alex Miller has officially released Clojure 1.13.0-alpha1 as of July 2, 2026.

Clojure Logo

🛡️ The Arrival of Checked Keys

The headline feature of this release is the introduction of checked variants for map destructuring. Previously, missing keys in destructuring would simply result in nil bindings. Now, you can enforce the presence of required keys using the following directives:

  • :keys! (Checked version of :keys)
  • :syms! (Checked version of :syms)
  • :strs! (Checked version of :strs)

If a required key is absent during destructuring, these directives will throw an exception, ensuring that your data conforms to expected shapes. Additionally, all directives now support specifying keys that should not be bound, which is useful for internal checking or purely for documentation purposes.

Summary of Destructuring Directives

DirectiveBehaviorRequirement
:keysBinds keys to symbolsOptional
:keys!Binds keys to symbolsMandatory (Throws if missing)
:symsBinds keys to symbolsOptional
:syms!Binds keys to symbolsMandatory (Throws if missing)
:strsBinds strings to symbolsOptional
:strs!Binds strings to symbolsMandatory (Throws if missing)

🛠️ Additional Enhancements & Fixes

Beyond checked keys, several other technical updates have been implemented:

Functional & Language Changes

  • req!: A new variant of the get function that explicitly reports when a key is not found.
  • Binding Restrictions: In let, loop, and let* blocks, the word as is now permitted disallowed as a local binding name.

Performance Optimizations

There is a significant change to how PersistentArrayMaps (PAM) behave when they only contain keyword keys. The threshold for transitioning to a PersistentHashMap (PHM) has been increased:

PAM Limit: 8→64\text{PAM Limit: } 8 \rightarrow 64PAM Limit: 8→64

This change is beneficial because PAM identity scans are more performant than PHM lookups within this specific size range, making it easier for the JVM to optimize.

Internal & Bytecode Updates

  • Bytecode Baseline: The ACC_FINAL designation has been removed from static initializer constants. This is a preparatory move to align with newer Java verifier checks.
  • Dependencies: Both runtime and test dependencies have been bumped to their most recent versions.

🚀 Getting Started

Ready to test the alpha? Follow these steps:

  • Update your project configuration.
  • Launch a REPL to verify the installation.

Option 1: Update deps.edn

Add the following to your :deps map:

org.clojure/clojure {:mvn/version "1.13.0-alpha1"}

Option 2: Quick Start via CLI

You can launch a REPL immediately using the Clojure CLI (regardless of your installed version) with this command:

clj -Sdeps '{:deps {org.clojure/clojure {:mvn/version "1.13.0-alpha1"}}}'


Published on 2026-07-04. Copyright 2008-2022 Rich Hickey.