3 ms·
This is really the kind of thing you want to fail at compile time which isn’t real possible in a dynamic language like Clojure.
by jimbokun 4mo ago
This is really the kind of thing you want to fail at compile time which isn’t real possible in a dynamic language like Clojure.
- xoxolian 4mo agoUnless you use Typed Clojure, which is a library. https://github.com/typedclojure/typedclojure https://github.com/typedclojure/typedclojure I haven't used it, so I don't know its tradeoffs; but its docs say its types exist at compile time: https://github.com/clojure/core.typed/wiki/User-Guide https://github.com/clojure/core.typed/wiki/User-Guide
- slifin 4mo agoWell it is possible - you can add a user macro that calls into clj-kondo (or anything actually) to check your codebase on compile It just doesn't make much sense to do - most modern developers will be running static analysers through LSP or their editor (knowingly or not) continuously on code change so as to see those errors quicker than re-compiling the program