One example of a common Clojure programming error is expecting a lazy expression to be evaluated for side-effects. On the surface it appears checking for unused lazy expressions would be helpful. What would be the best approach to identifying this and other common mistakes? Should the core compiler check for these situations, or should it be the domain of a lint program to detect? What would be a good way to start the implementation?
How about:
:default
method& rest
type argumentsNot sure how these checks would be implemented, but they would sure save me from myself a lot of the time.
A couple of ideas just to get things started; it could detect lazy code that can never be realized, or point out areas where reflection will be used. Though in general is clojure a little young as a language to express a common set of provable mistakes?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With