You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Never seen such style in practice, so I'm very wary about supporting it. I feel your pain, though. The effort to drop some parentheses in Clojure was a big misguided IMO.
I have developed a habit of leaving one line between the conditionals. The proposed indentation has an unpleasant drawback. Long conditions look like function calls; especially problematic with multiline statements:
(let [ev (eval v)]
(cond
(instance? java.lang.Enum ev)
(.visitEnum
av name (descriptor (class ev)) (str ev))
(class? ev)
(.visit
av name (clojure.asm.Type/getType ev))
:else (throw (IllegalArgumentException.
(str"Unsupported annotation value: " v " of class " (class ev)))))
Hi,
With the parentheseslessness of clojure comes the burden that the indentation of the multi-line code becomes awkward.
Would it be posible to shift even clauses of
cond
by 2 spaces? An example from clojure.core:Could it be:
The text was updated successfully, but these errors were encountered: