- first, the ClojureScript REPL whines at smelly coercions out of the box
cljs.user=> (+ 1 "2" nil)
WARNING: cljs.core/+, all arguments must be numbers,
got [number string] instead. at line 1
WARNING: cljs.core/+, all arguments must be numbers,
got [number clj-nil] instead. at line 1
"12null"
- second, the author kind of hints you should be using schemas & coercion already (so as to desmellify)- third, you can typecheck a codebase incrementally
Also, I really thought I'd see that quote about 100 functions operating on a 1 data structure easier to grok than 10 functions operating on 10 different data structures. Of course, it's nicer when that 1 data structure (or even the 10) has a schema instead of being void *.