MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/Clojure/comments/6d3w8i/readable_clojure/di0t10i/?context=3
r/Clojure • u/[deleted] • May 24 '17
31 comments sorted by
View all comments
8
(when (seq x) ...) is a standard Clojure idiom. I don't think using it makes the intent unclear.
(when (seq x) ...)
I disagree about not using comp. To my mind (comp f g) is more readable than #(f (g %)) because there's no extraneous syntax getting in the way.
comp
(comp f g)
#(f (g %))
Using a * prefix for mutable references is interesting.
*
Using two empty lines between functions just seems like wasted space to me. I have no difficulty seeing the gaps between functions.
Other than those things, there are a lot of sound ideas.
8
u/weavejester May 25 '17
(when (seq x) ...)is a standard Clojure idiom. I don't think using it makes the intent unclear.I disagree about not using
comp. To my mind(comp f g)is more readable than#(f (g %))because there's no extraneous syntax getting in the way.Using a
*prefix for mutable references is interesting.Using two empty lines between functions just seems like wasted space to me. I have no difficulty seeing the gaps between functions.
Other than those things, there are a lot of sound ideas.