Hacker News new | past | comments | ask | show | jobs | submit login

I've had good luck with prismatic schema https://github.com/Prismatic/schema, which seems to be along a similar direction. It's fairly low commitment and can lead to big gains fairly quickly. I assume this would be similar.



Prismatic Schema is wonderful. One useful property is that a schema is just a regular data structure (often a map). So you're free to use regular data structure processing functions:

    (def Customer {:customer-id s/Int, :address-id s/Int}

    (def ProcessedCustomer (merge Customer {:external-id s/Int}))


Ditto. Augmenting my code with schema has also been a life saver in terms of documenting the input and output types of functions (e.g. complex, deeply-nested maps) so I can return to code months later and understand what's going on.


Everything that's been said is about prismatic schema is great. We've found the most benefit from using schema as a documentation tool. i.e. This is what an order-request, customer, order, etc. looks like.


After assessing the lib, I still prefer schema. I find that it's always more convenient that you can separate the schema and the data itself.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: