|
|
|
|
|
by pyritschard
3684 days ago
|
|
This is an important move for the Clojure language. As with all dynamic languages, and exarcerberated by the fact that it encourages relying on data first - as opposed to say, classes in other languages - Clojure puts the onus on the developer to catch errors in data. The clojure community as a whole embraced prismatic's schema as a way to provide occurence typing for data. Since library authors often tend to reduce their dependency surface, most libraries do not ship with it though. With the inclusion of this in clojure core, it will now be possible to provide occurence typing at the edge of functions instead of tracking malformed input deep inside apps. The racket-type contract notation is also a very welcome change from other similar approaches in my opinion. [1]: https://github.com/plumatic/schema |
|
The rationale is a good read.