On Saturday, December 20, 2014 9:30:47 AM UTC-5, tbc++ wrote:
>
> I recently browsed parts of that guide and was surprised how many bits I 
> disagreed with. Especially around the "one space in these rare cases" bits. 
> Not that that is a bad thing it's just my personal opinion that everything 
> should always use two space indentation. 
>
> And on a client project recently, it was decided (when I wasn't around) 
> that the arguments to a function should always be on a newline:
>
> (defn foo
>   [x]
>   (+ x x))
>
> Instead of:
>
> (defn foo [x]
>   (+ x x))
>
> I disagree with this idea also, but whatever, it's just style. It's not 
> like I suddenly can't read Clojure code since it's in the wrong style. 
>

My own tendency is to put the arglist inline with the defn foo iff it's the 
only arity and there's no docstring. If there are several arities each 
starts on a line by itself. And if there's a docstring, it's defn foo 
<newline> docstring <newline> arglist...

Of course, since I aggressively document most functions (even non-publics) 
I don't tend to use the inline arrangement very often, except on local 
functions: (fn [x y] (map do-something x (map inc y)))... 

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to