News for hackers. Stuff that matters.
Re:Better Clojure formatting by dkersten on Friday December 07, 2018 @05:10AM (#18626398)
> Not really; prose doesn't indent with increasing nesting

Clojure lines increase in length as they increase in nesting, but without increasing nesting, they don't typically get particularly long[1], unless you have very long argument lists or very long names. So, the key is to reduce nesting (which helps comprehension anyway) and Clojure has plenty of tools to help with that: you can use ->, ->>, as->, some->, or you can bind sub-expressions to names using let/when-let/etc. There's no need to split code into smaller functions unless it makes sense to do so (eg for code reuse or semantically).

[1] 2-space indents help keep indents from being crazy wide without crazy nesting. The only place where I often find lines getting too long is let-blocks with aligned expressions and long variable names:

    (let [this-name-is-too-long (some-code-here
                                  (uh-oh this is getting long)
        ...
Re:Better Clojure formatting by OliverM on Friday December 07, 2018 @07:02AM (#18626949)

        ]
    ))
Had to close those parens to stop the mental itch!
Re:Better Clojure formatting by dkersten on Friday December 07, 2018 @09:36AM (#18627969)
Hah! But but but I did close them (implicitly, as part of the "...")