:or Changed Under You: One Destructuring Form, Two Answers

Table of Contents

A draft for the proposal shelf. Not submitted anywhere. Status: Lightning only.

1. Pitch

The same form returns [1 1] on Clojure 1.12.5 and [1 100] on 1.13.0-alpha8, and the release notes do not say so.

2. Abstract

Clojure 1.13 extends map destructuring with checked keys and directives that return data. Along the way, :or defaults moved: they are now evaluated before the input and cannot see bindings from the same form. (let [a 100 {:keys [a b] :or {b a}} {:a 1}] [a b]) gives [1 1] on 1.12.5 and [1 100] on 1.13.0-alpha8. Seven minutes on one behaviour change, how to find the forms it touches, and what the new directives are for.

3. Audience, format, venue

Audience
Working Clojure developers about to upgrade.
Format
7 to 10 minute lightning. Re-run against the release before submitting.
Where
Dutch Clojure Days lightning, a Clojure meetup.

4. Review

This replaces the 40-minute Select, Don't Reject draft. Rich Hickey gave that talk himself at Clojure/conj on 2026-10-01, so a re-explanation would be second-hand; the evaluation-order change is the part that is new. Both reviews found the first draft's evidence missing: the directives are written up only in the Clojure/conj 2026 notes, which were still an open pull request when this was drafted, and the 1.13 section of the Advanced Clojure note describes different features and should not be cited. The feature is alpha.

5. Backing

Public repositories:

  • None public. Concept only.

Notes on this site: