Schema 0.2.0: back with Clojure(Script) data coercion
blog.getprismatic.com
Schema 0.2.0: back with Clojure(Script) data coercion
1–8 of 8 posts
Re: Schema 0.2.0: back with Clojure(Script) data coercion
#2Re: Schema 0.2.0: back with Clojure(Script) data coercion
#3Author here, interested in your comments and happy to answer any questions.
I've been writing the same boiler plate code in my API layer as well and have been thinking about something like this for a while. This is the first validation library I've seen that provides the coercion needed when dealing with user generated data. I've seen plenty of libraries that do one or the other, but when you use two libraries you end up duplicating the schema definition or writing custom transformation functions to make the libraries play nicely together.
I haven't play with it yet, but am extremely excited to do so and will post my thoughts soon. Thanks for all the great stuff you and the Prismatic team are putting out; it's greatly appreciated!
Re: Schema 0.2.0: back with Clojure(Script) data coercion
#4Re: Schema 0.2.0: back with Clojure(Script) data coercion
#5Author here, interested in your comments and happy to answer any questions.
Jason this looks sweet! I don't ever comment on HN, but I couldn't hold back when I read the post. I've been writing the same boiler plate code in my API layer as well and have been thinking about something like this for a while. This is the first validation library I've seen that provides the coercion needed when dealing with user generated data. I've seen plenty of libraries that do one or the other, but when you u…
Re: Schema 0.2.0: back with Clojure(Script) data coercion
#6Author here, interested in your comments and happy to answer any questions.
However this makes me think about "types-driven development" and static typing a-la Scala or Haskell. I'm more inclined toward the dynamic typing camp, but I'm still debating with myself about this.
In the first post about Schema and in the recently released talk about it static typing was cited but my key takeaway was: schema is about data-shape validation and documentation, similar to static typing but much more lightweight and a-la carte. So good so far. Now with the 0.2.0 version schemas (an information model encoding) can be leveraged to do coercions, code generation, etc. Schema encodings start to resemble abstract data types and a kind-of optional and a-la carte "static" typing. Maybe the main difference is that while static types are central and a way of thinking, here schemas are a tool that can be used in different ways.
Just my crude ruminations, soon I'll come around studying Haskell. What do you think?
edit: fixed a typo and added some minor things.
Re: Schema 0.2.0: back with Clojure(Script) data coercion
#7Author here, interested in your comments and happy to answer any questions.
Re: Schema 0.2.0: back with Clojure(Script) data coercion
#8Author here, interested in your comments and happy to answer any questions.