Fork me on GitHub

So Rich said they're releasing a new clojure.spec, is it going to be radically different, or backwards compatible?


he mentioned being careful about backward compat in the talk. Then again it's an alpha, so breakage might very well happen

Alex Miller (Clojure team)14:11:28

The plan is that it will be as backwards-compatible as possible

Alex Miller (Clojure team)14:11:58

Things like s/keys may continue to exist but be deprecated for example


From what I got, instead of having to split into required and optional argument sin the spec. it's moved to something different, and you can specify on the function witch fields you need/expect


It it already in spec alpha-2, or do we need to wait a bit?

Alex Miller (Clojure team)14:11:31

No, it’s not available yet

Alex Miller (Clojure team)14:11:08

We are doing some reorg of the impl in spec-alpha2 at the moment

Alex Miller (Clojure team)14:11:31

And then we will be diving into the new stuff


just finishing up the talk, so spec stuff will be baked into defn, or is that pseudo-code?


or rather spec/defn


man, i'm really excited for these changes


I was hesitant when using spec in my work's project, but I feel like it would really benefit from these changes, especially when defining specs between different data layers


Just a few days ago I suggested to someone to just use optional keys for his specs and validate presence of keys in some other way. (GraphQL context). Glad to hear there’s going to be a better way.

🙂 8
Alex Miller (Clojure team)16:11:29

@benzap it’s possible it will get integrated more into defn - currently TBD but Rich is thinking about it


Interesting! I can definitely see the tradeoffs on both sides

Alex Miller (Clojure team)16:11:05

that of course wouldn’t happen till Clojure 1.11, if at all


That's good to know, i'm thinking i'll use the current clojure.spec until then