3 ms·
My approach: - validate agressively at the system boundaries (IO- or user- facing stuff) - inside the system, clojure implementation code isn't particularly n
by vemv 8y ago
My approach:
- validate agressively at the system boundaries (IO- or user- facing stuff)
- inside the system, clojure implementation code isn't particularly nil-aware
- inside each namespace, the most important functions (typically their public part) are covered with pre/post conditions. This checks/documents the arguments/return type + (implicitly) non-nilness.
- pre/post conditions are implicitly exercised with integration tests.
There's clojure.spec/fdef if you prefer that to :pre/:post.