3 ms·
Idiomatic Clojure tends to have fewer parenthesis than Java.
by arohner 11y ago
Idiomatic Clojure tends to have fewer parenthesis than Java.
- rgoddard 11y agoI also find that it tends to be more concise which lends to denser code. The density can be a bit off putting until you become accustom to reading it. The other part that is weird is having all of the closing parenthesis on a the last line. Consider the idiomatic way: (defn do_stuff [coll] (filter #(> % 10) (map Math/sqrt coll))) Vs (defn do_stuff [coll] (filter #(> % 10) (map Math/sqrt coll) ) ) Even though this is the same code, if you are coming from a c-style background the latter is probably easier to read.