3 ms·
I second this emotion - "How would you check a spec from anything other than clj/cljs" is (IMO) the critical question here. Sure you could check out my git re
by hospadar 6y ago
I second this emotion -
"How would you check a spec from anything other than clj/cljs" is (IMO) the critical question here. Sure you could check out my git repo in a safe VM and execute it there, but that's a WHOLE lot more hassle than an XML or JSON schema. It's not just a language barrier thing.
There's nothing stopping spec predicates from making network calls, looping forever, etc. If I wanted to be able to call my spec from other apps I'm writing, I could package it as a library easily, but a workflow like rest call->get spec->validate data (which I've implemented many times for JSON schema for simpler things) wouldn't really be practical with spec (without at least setting some really tight restrictions on what features of spec you're allowed to use)
Again, not really a failing of spec, it's just not designed for that kind of workflow.
- joshlemer 6y agoYeah not a fault of spec at all, which is really awesome and even inspirational IMO.
- slifin 6y agoYeah spec is quite a general thing, there are libraries which convert specs into database schemas, JSON schema, swagger etc If communicating constraints to another environment is required they should help