Introducing Standard Clojure Style

Standard Clojure Style pretty-prints ns forms “from scratch” every time. For the rest of the code it “adjusts” what is already there.

Issue #60 contains a pretty thorough discussion of this behavior. Standard Clojure Style supports using a , to “hold” the parens on the next line for those cases where the developer does not want to gather trailing parens as recommended by the Clojure Style Guide. A rich comment block at the end of a file is a common use case for this.

Just want to point out that this is exactly the sort of thing that creates small friction on PRs (“nit” comments). This can also be confusing to developers who are new to Clojure (when to do this? when not to?) and is incompatible with Parinfer users, who never have to think about this because their editor always manages closing parens for them.

This is not to suggest “you are wrong”, or “this is bad”, or even that you should stop doing this! Only that it is inconsistent style and can cause extra diffs in a codebase that is shared by multiple developers all using different editors and tooling.

My hope for Standard Clojure Style is to alleviate these small frictions for development teams who adopt Clojure.

1 Like