Open
Description
We recently had discussion about this rule at work. We have two Emacs user, single Vim user and many Cursive users and all but Emacs users found this rule strange. Maybe it's because we don't have lisp background, but then I think good part of Clojure community nowadays doesn't have Lisp background.
To solve this at work we could just fork the style guide and decide on our own rule, but I wonder if this rule is worth to discuss on community level. I would like to hear more opinions on this rule to see if the style guide needs some changes? At least would be good to mention the rationale for rule as it doesn't seem to be that obvious :)
;; good
(filter
even?
(range 1 10))
;; bad?
(filter
even?
(range 1 10))
Reasons for single space indentation:
- Used in every Lisp for decades
- Used by Emacs (clojure-mode)
- Plenty of code using this rule?
Reasons against (or evidence that this is not obvious):
- Not used by Vim (vim-clojure-static), Cursive
- There's plenty of code not adhering to this rule (ring, just searched for one example on a popular lib, there is probably opposite examples too)
- Books mentioned in style guide don't use the rule 1 (they break other rules too, so not that great example)
- Simpler rules, no need for have special cases for macros with body forms which are indented with 2 spaces (so it's complex to set up this rule when editor doesn't have built-in support)
Metadata
Metadata
Assignees
Labels
No labels