9

In Ruby, there are several tools to calculate complexity of the code, for example the cyclomatic complexity, the ABC score or flog, as described here: http://blog.codeclimate.com/blog/2013/08/07/deciphering-ruby-code-metrics/

Are there similar tools calculate the complexity of functions and/or entire namespaces in clojure?

1 Answer 1

9

To expand on my previous answer to a similar question: Homoiconicity in Clojure makes it quite easy to calculate basic code complexity measures.

That said, I wouldn't bother. The biggest sources of complexity in beginner Clojure programs come from wrong things, not structurally complex things. For example, programmers coming from a language like Ruby that encourages unstructured mutation are likely to initially:

Interestingly, many of these mistakes might also be flagged by automatic analysis.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.