clojure-style-guide icon indicating copy to clipboard operation
clojure-style-guide copied to clipboard

A community coding style guide for the Clojure programming language

Results 48 clojure-style-guide issues
Sort by recently updated
recently updated
newest added

As far as I know, this shouldn't be allowed: ``` clojure (def my-collection [ x y]) ``` but there is not a specific rule anywhere that addresses this style.

Hello. Is it recommended to destructure arguments in function definition or in let inside the function? The first approach affects readability though shortens the function. Any thoughts about this? E.g....

Sometimes it useful to comment out multiple lines. That can be done with the comment macro: ``` (comment (some-code-1) (some-code-2) (some-code-3)) ``` Maybe it's worth to mention that in style...

Originally posted in this [issue](https://github.com/bbatsov/clojure-style-guide/issues/5). I believe that we should use parentheses instead of brackets inside of namespace declarations. The first word of the inner form is special, and thus...

After searching for how to [apply default values for function parameters](http://stackoverflow.com/a/8660833/881224), I was pointed to a great example of [some code here](https://github.com/Raynes/clavatar/commit/9fea6689ba4d08da5912238173c080f501475a78#L3R18). I am quite new to the language, so...

One of the differences in Clojure from other Lisps that I have used is that frequently there are pairs of s-expressions without enclosing parentheses. These show up in binding vectors...

Re. "The only comments in which omission of a space between the semicolon and the text is acceptable are margin comments." Leaving out the space there looks bad, IMO. I...

`empty?` is simple, direct, and effective. The use of `seq` as a drop-in replacement for `(complement empty?)` is not style worth propagating, because it doesn't encourage straight-forward code readability.

I've seen code like ```clj (if (or (something) (something-else)) do-something do-something-else) ``` in the wild. I would like to be able to point to a style guide note about this....