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

The biggest manifestation of this is clojure spec:

https://clojure.org/about/spec

If your impression is that this is like sugary unit tests: It is not. You can run specs during development, while running a in-editor REPL, code gets evaluated while you type it so to speak.

It is way more expressive than a type system and it is opt-in, but it doesn't give the same guarantees obviously. It is also not meant to be a type system but rather a tool to express the shape of your data. It is used for obvious things like validation but also for documentation (over time) and generative testing among other things.




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

Search: