Fork me on GitHub

Curious if you could elaborate on why. I can see it being an impractical spec to validate outside of narrow test scenarios, but the documentation benefit seems worthwhile even so

Alex Miller (Clojure team)02:08:30

because spec is about data and atoms are about state

Alex Miller (Clojure team)02:08:30

it makes sense to me to spec the functions used to update an atom though

Alex Miller (Clojure team)02:08:57

this is just my own thoughts btw, not sure if rich or stu would agree so take it with that perspective


I guess people could use set-validator! with a normal spec? Does anyone ever use it?


I used to do exactly that with prismatic Schema. Works well


It's all so... composable


Am I… doing something wrong here?


(clojure.spec.gen/vector clojure.spec.gen/char-alphanumeric 5)
AssertionError Assert failed: First arg to vector must be a generator
(generator? generator)  clojure.test.check.generators/vector (generators.cljc:446)


sorry, I see now, these vars turned into fns, presumably to facilitate lazy-loading