In Clojure 1.13-alpha4, one part of the grammar for checked-key destructuring vectors changed:
;; Before
(s/+ ident?)
;; After
(s/+ any?)
These are the elements appearing after & in forms such as:
{:keys! [required-key & optional-key]}
Before the change, every element after & had to satisfy ident?—that is, be a symbol or keyword. Afterward, those
non-binding elements may be any Clojure value/form, including strings, numbers, collections, or other valid map keys:
{:keys! [required-key & "string-key" 42 [:composite :key]]}
The key distinction is that elements before & create local bindings and therefore retain their type restrictions.
Elements after & only identify keys and do not introduce bindings, so restricting them to identifiers was unnecessarily
narrow. The change applied to :keys, :syms, :strs, and their checked ! variants because they share the
::non-binding-elements spec.
In Clojure 1.13-alpha4, one part of the grammar for checked-key destructuring vectors changed:
These are the elements appearing after & in forms such as:
{:keys! [required-key & optional-key]}Before the change, every element after & had to satisfy ident?—that is, be a symbol or keyword. Afterward, those
non-binding elements may be any Clojure value/form, including strings, numbers, collections, or other valid map keys:
{:keys! [required-key & "string-key" 42 [:composite :key]]}The key distinction is that elements before & create local bindings and therefore retain their type restrictions.
Elements after & only identify keys and do not introduce bindings, so restricting them to identifiers was unnecessarily
narrow. The change applied to :keys, :syms, :strs, and their checked ! variants because they share the
::non-binding-elements spec.