This looks very interesting. I particularly like the integration with test.check.
However the "global namespaced registry of specs" concerns me as a design decision.
Maybe the registry solves certain problems, but I'm worried that it introduces more issues than it solves. I'd be much more comfortable with a system that treats specs as first class values (that's something I really like about Schema) rather than something that gets auto-magically looked up in a global mutable registry.
Interested to hear the design rationale behind this.
9
u/alexdmiller May 24 '16
Some of the highlights:
predicate based - reuse your existing functions rather than use a new set of words/types
separation of attribute specs from map key sets
global namespaced registry of specs
rigorous path system for identifying parts of a spec
I think it also covers a much broader generator space by default, but I haven't used schema generators enough to say that for sure.