On Tuesday, February 20, 2018 at 10:28:12 AM UTC-6, Erik Assum wrote:
>
> FWIW, I’ve been using https://github.com/metosin/spec-tools
> on a couple of projects lately, which helps nicely with
> conformance and coercion. The main devs are very helpful on #ring-swagger 
> on the Clojurians slack. 
>
> Alex, how does spec-tools measure up to your thoughts on 
> conformance/coercion?
>

spec-tools combines specs for your desired *output* with a coercion 
function, making the spec of the actual data implicit. I feel like this 
conflates too many things and obscures the actual input data value, which 
is the same problem the original poster had. Also, spec-tools introduces 
the notion of "type". spec intentionally avoids creating a new vocabulary 
of special words like this and in all cases relies on predicates or things 
mapped to predicates instead. I'm not a fan of this approach and I don't 
like the idea in CLJ-2116 much either - I think it's pretty unlikely this 
is where we will end up.

In general, I think a lot of the functionality in spec-tools either uses 
implementation internals that are almost certain to break as spec evolves 
or is at odds with the philosophies of spec as stated 
in https://clojure.org/about/spec (like the type vocabulary thing).

I do see the problems driving this, and I agree there is a gap to be filled 
here though. 

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to