12 ms·
It seems like the main purpose of the exception-based validation function `check` is to provide an explanation for failures. Could this have also been achieved
by lgessler 8y ago
It seems like the main purpose of the exception-based validation function `check` is to provide an explanation for failures. Could this have also been achieved by returning an error object with the same information in it? This is what clojure.spec does: https://clojure.github.io/spec.alpha/clojure.spec.alpha-api.html#clojure.spec.alpha/explain-data https://clojure.github.io/spec.alpha/clojure.spec.alpha-api....
- LinaLauneBaer 8y agoSometimes you want to do a lot of other stuff in the same scope and simply bail out on any error without having to check every return value.